Michael said:
I am having trouble getting the boost thread library to work. I am using Borland C++Builder 6 (on Win2k), and I tried the 1.29.0 release and the 1.30.0.b1 beta release and both give me the same errors in the condition.hpp file:
line 93: " 'operator!' not implemented in type 'recursive_mutex' for arguments of the same type"
and
line 96: " 'recursive_mutex::m_mutex' is not accessible"
Looking at these lines and making some assumptions, I think you're passing the wrong type to wait(). You need to pass a Lock, not a Mutex. IOW I think you have something like this: recursive_mutex mx; condition cond; while (pred) cond.wait(mx); when you should instead have this: recursive_mutex mx; condition cond; recursive_mutex::scoped_lock lock(mx); while (pred) cond.wait(lock);
Plus another 5 errors. I tried to look at the condition and recursive_mutex class definitions and I do not understand how they are implemented. Am I using it wrong to get that error?
I believe so, but you'll have to let me know if I interpreted things correctly. -- William E. Kempf