Boost Users :
Subject: Re: [Boost-users] [threads] How to test for running thread
From: Bill Somerville (bill_at_[hidden])
Date: 2008-10-15 09:49:02
Koen Vermeer wrote:
> Suppose I have a thread running, I issue an interrupt(), and the thread
> starts to perform its cleanup code. As this may take some time, I'd like
> to know when the thread actually is stopped. Is there some standard
> approach on how to do this? I was thinking about testing if the thread
> object equals Not-a-Thread, but I've yet to find out how...
I think thread::join() or thread::timed_join() is what you are looking for.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net