Boost logo

Boost Users :

From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2005-08-22 08:23:26

ycc wrote:

>Hi, booster,
>I am using boost.thread in Windows with VC6, it's quite handy and useful.
>I found it's better if the library can add 2 additional methods.

>another one is a way to return the raw thread_handle.
>typedef platform_dependent thread_handle
>thread_handle handle() const ;
>by this, I can suspend, terminate the thread in Windows, or in Posix
>platform using #ifdef.
>For example;
> boost::thread t(...);
>#ifdef WINDOWS
> ::TerminateThread(t.handle());
This is unsafe because, for example, the target thread may be holding a
mutex which can then never be unlocked. Valid uses for thread suspension
and termination are few and far between.


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