|
Boost Users : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-11-04 12:11:21
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
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