
4 Nov
2006
4 Nov
'06
5:11 p.m.
Daher wrote:
How do I create a global mutex in boost.threads ?
Like any other global object. boost::mutex globalmutex; int main(int argc, char* argv[]) { .... } You will be able to use it after main is up and running. I.e. do not start any threads from global constructors, or try to lock the mutex from within other global constructors. Is this answering your question? Roland