Dear Nate and Gavin,
Thank you so much for such a detailed explanation! It is very clear now.
boost-users-request@lists.boost.org wrote:
Send Boost-users mailing list submissions to
boost-users@lists.boost.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.boost.org/mailman/listinfo.cgi/boost-users
or, via email, send a message with subject or body 'help' to
boost-users-request@lists.boost.org
You can reach the person managing the list at
boost-users-owner@lists.boost.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Boost-users digest..."
Today's Topics:
1. [thread] Test if a thread is running (Patrick Steele)
2. Re: [thread] Test if a thread is running (Kim Barrett)
3. Re: [thread] Test if a thread is running
(christoph.kliemt@pgxml.net)
4. Type Erasure: Infinite loop when accessing an element of a
container of any<>, where the element is another container
(Alexandre Pretyman)
5. Re: [boost] [1.55.0] Beta 1 Available (Rich E)
6. Re: Boost range iterator pointing to wrong element (Nathan Ridge)
7. Re: [thread] Test if a thread is running (Patrick Steele)
----------------------------------------------------------------------
Message: 1
Date: Tue, 8 Oct 2013 17:15:05 +0100
From: Patrick Steele
To: boost-users@lists.boost.org
Subject: [Boost-users] [thread] Test if a thread is running
Message-ID:
Content-Type: text/plain; charset="iso-8859-1"
boost = 1.54
OS = Windows 7
compiler = Visual Studio 2005
Hi,
in order to test if a boost.thread is running I used timed_join as per
http://stackoverflow.com/questions/1667420/how-can-i-tell-reliably-if-a-boos...,
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?
Thanks,
Patrick