Boost logo

Boost Users :

From: Raúl Huertas (raulh39_at_[hidden])
Date: 2006-12-10 05:29:44


Offlein escribió:
> Hi all,
>
> i'm missing something like PThread's pthread_cancel.
>
In point 9 of
http://tinyurl.com/yn2y7m
it is stated:
"There's a valid need for thread termination, so at some point
Boost.Threads probably will include it, but only after we can find a
truly safe (and portable) mechanism for this concept."

I am not sure if Boost.Threads is actively maintained, so I don't know
when "at some point" is...

> Is there a Way to use Boost::Threads in a similar Way.
> I looked in the Docu and didn't find anything similar to pthread_cancel.
>
>
We normally use some kind of inter-thread communication for that purpose.
If we communicate threads using a message queue, for example, we have a
message that says: "ok, time to die". ;)
It is not the same, but it is almost always sufficient (In our work, we
use a lot of sockets, so we have developed similar mechanisms that we
use for socket.read's or ::select's, for example)

> Is there another Functionality which kind of "implement" this Behaviour of PThreads or am i blind and don't see where it's written in the Docu?
>
I don't think so.
> I don't want to use anything else because Boost is a very good Collection of Libraries, which are very well written.
>
Yes, I agree. :-)

Regards.


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