Boost logo

Boost Users :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2004-12-17 08:19:13


Michael Garriss wrote:

>
> err. those exmaples got mixed up (thx Bklyn). global mutex breaks it
> and member var mutex works.
>
Using a global mutex causes the pthread_mutex_init to be called before main.
A quick poll on the comp.programmin.threads showed the answer that this
should
be allowed. However I am still suspicious.

For one you are getting this unexpected error, for the other pthread
defines a special
PTHREAD_MUTEX_INITIALIZER, which causes the mutex to be
initialized on first use. But boost.threads is not using this.

We need to look into this.

BTW. the code compiles and runs correctly on windows. (altough I did not
manage
yet to test it win pthreads-win32 port.)

Roland


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net