[fpc-pascal] Is TFPList thread safe?

Marco van de Voort marcov at stack.nl
Mon Oct 6 12:32:19 CEST 2014


In our previous episode, Michael Schnell said:
> > So critical section is equal to posix mutex with 
> > PTHREAD_PROCESS_PRIVATE attribute.
> Thanks for the clearness !
> 
> (The OP of course just wants just this - synchronization between threads 
> of a single application.)

On *nix for critical section, cthreads creates a mutex of the recursive
type(_PTHREAD_MUTEX_RECURSIVE) but doesn't set that attribute, but it seems(*) that the above
attribute(PTHREAD_PROCESS_PRIVATE) is default.

(*) http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_mutexattr_getpshared.html




More information about the fpc-pascal mailing list