[fpc-devel] ref count types / threadsave question

Jonas Maebe jonas at freepascal.org
Sun Jan 6 15:34:12 CET 2019


On 06/01/19 15:30, Martin Frb wrote:
> Out of interest...
> What about TRTLCriticalSection?
> If a variable is shared between 2 threads, and only accessed within a 
> TRTLCriticalSection?

 From the mail you replied to:

***
In general: always use an RTLEvent, mutex, *critical section* or similar 
to access shared data. Those will ensure that the necessary memory 
barriers get inserted.
***


Jonas



More information about the fpc-devel mailing list