
Thank you for the note. It's goot to know. But as you wrote this doesn't seem to be the cause of the crash, because when I stop using the mutex then the crash is gone. Vaclav -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Phil Endecott Sent: Friday, November 23, 2007 5:09 PM To: boost@lists.boost.org Subject: Re: [boost] [threads] Using boost::mutex raises access violationexception v2cechura wrote:
boost::xtime xt = {2}; boost::thread::sleep(xt);
I presume that you want this to sleep for 2 seconds. I doubt that this is the reason why your program crashes, but note that xtime should be an absolute time, not relative (at least, in the version that I'm using). You need something like: struct boost::xtime xt; xtime_get(&xt, boost::TIME_UTC); xt.sec += 2; boost::thread::sleep(xt); Phil. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost