17 Dec
2004
17 Dec
'04
1:19 p.m.
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