On 17.03.2017 23:51, African Wild Dog wrote:
I will have to redesign my classes =(.
Maybe you just can add a field denoting the thread (by n integer) and
set this when creating an instance, and later just read it for the
appropriate purpose...
-Michael
__
On 17.03.2017 17:13, Karoly Balogh (Charlie/SGR) wrote:
This is actually entirely platform specific. The underlying
implementation of threadvars is very different for each platform, and
highly depends both on the CPU arch and the OS.
That might be true.
Last time I checked (several years ago),
2017-03-17 5:50 GMT-03:00 Michael Schnell :
> On 16.03.2017 19:38, African Wild Dog wrote:
>
>> I have a class where its instances are shared between multiple threads.
>> How can I declare one variable per instance per thread?
>>
> Does this really make sense ?
>
> Accessing threadvars (in fpc) co
Hi,
On Fri, 17 Mar 2017, Michael Schnell wrote:
> Accessing threadvars (in fpc) costs a lot more CPU cycles (i.e. involves
> an OS call) than accessing normal variables.
This is actually entirely platform specific. The underlying implementation
of threadvars is very different for each platform,
On 16.03.2017 19:38, African Wild Dog wrote:
I have a class where its instances are shared between multiple threads.
How can I declare one variable per instance per thread?
Does this really make sense ?
Accessing threadvars (in fpc) costs a lot more CPU cycles (i.e. involves
an OS call) than a
On Thu, 16 Mar 2017, African Wild Dog wrote:
I have a class where its instances are shared between multiple threads.
How can I declare one variable per instance per thread?
The code below does not compile (fpc 3.0.0):
TMyClass = class
public
threadvar MyValue: Integer;
end;
This is not fo
I have a class where its instances are shared between multiple threads.
How can I declare one variable per instance per thread?
The code below does not compile (fpc 3.0.0):
TMyClass = class
public
threadvar MyValue: Integer;
end;
Regards
___
fpc-pasc