[fpc-devel] ref count types / threadsave question

Martin Frb lazarus at mfriebe.de
Sun Jan 6 15:30:42 CET 2019


On 06/01/2019 15:00, Jonas Maebe wrote:
> On 06/01/19 14:42, Martin Frb wrote:
>> Btw about threads seeing different cached versions of data.
>> What happens in case of synchronize?
>
> Synchronize uses an RtlEvent. That one uses OS primitives that include 
> memory barriers, so the data will be properly synchronised across cores.


Out of interest...
What about TRTLCriticalSection?
If a variable is shared between 2 threads, and only accessed within a 
TRTLCriticalSection?



More information about the fpc-devel mailing list