
On Fri, Jan 22, 2010 at 7:57 AM, Stephen Torri
Well I had a chance to sit down and see what was going on with my logging project. What I found out is that the call to thread::join in the destructor of my logging class is never returning even though the thread was signaled to stop running. Below is the code. Since I am new to boost threads I am sure I am making a fundamental mistake.
Not sure. Try destroying the tracer earlier - ie at the end of main. Currently it is a global static Singleton and thus is being destroyed very late. Maybe that shouldn't be a problem, but hard to say, and easy to try. P.S. you are still not unlocking your mutex when processing the local_queue. Try passing the unique_lock into processTraces(lock), then inside: 1. assert(lock.owns_lock()) 2. lock.unlock after copying, but before the for-loop 3. lock.lock after for-loop Tony