Boost logo

Boost Users :

Subject: [Boost-users] [thread] Test if a thread is running
From: Patrick Steele (steele.patrick_at_[hidden])
Date: 2013-10-08 12:15:05

boost = 1.54
OS = Windows 7
compiler = Visual Studio 2005

in order to test if a boost.thread is running I used timed_join as per,
which recommended that I should be able to call timed_join with a wait time
of 0 ie
bool isThreadRunning = ! m_Thread.timed_join( boost::get_system_time() );
I have just upgraded to boost 1.54 to see that this no longer appears to
work and that the timed_join function is being deprecated.
Can you tell me how I should now check whether a thread is running please?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at