
Filip Klasson <filkl784@student.liu.se> writes:
Hi,
I get Assertion failed timed_lock(::boost::detail::get_system_time_sentinel()), file c:\boost\thread\win32\basic_timed_mutex.hpp, line 64.
Code in basic_timed_mutex.hpp: void lock() {
BOOST_VERIFY(timed_lock(::boost::detail::get_system_time_sentinel())); //Line 64 }
That really is bizarre. Can you show a minimal example that demonstrates the problem?
Here is my code, i have marked where Assertion failed happends.
boost::mutex::scoped_lock lock(_mutex); while(_queue.empty()) { _condition.wait(lock); } //Assertion failed happends here. //Another thread is signaling the condition variable when an element is added to the _queue.
What is the lifetime of the various elements _mutex, _condition and _queue? Is it possible that they have been destroyed by another thread? Anthony -- Author of C++ Concurrency in Action | http://www.manning.com/williams just::thread C++0x thread library | http://www.stdthread.co.uk Just Software Solutions Ltd | http://www.justsoftwaresolutions.co.uk 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976