Jonas Maebe wrote:
This last pthread_mutex_unlock does not make sense to me. From the pthread_cond_wait man page:

Read the man page *completely*.

A condition variable must always be associated with a mutex, to avoid the race condition where a thread prepares to wait on a condition variable and another thread signals the condition just before the first thread actually waits on it.

and:

Before returning to the calling thread, !pthread_cond_wait! re-acquires |mutex| (as per !pthread_lock_mutex!).

Micha
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to