Boost logo

Boost Users :

From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2005-02-10 05:14:37


Cory Nelson <phrosty <at> gmail.com> writes:

>
> The reason it is not implemented is likely because canceling a thread
> can be unsafe - there is no stopping it from canceling in the middle
> of a malloc()/new (in win32, at least) and leaking memory.

This shounds like you're talking about thread *termination*, which indeed is
not safe. IIUC, then a future thread cancellation feature in boost::thread
works with exceptions which are thrown from lock/wait functions. So, a thread
cannot be cancelled while it is busy allocating memory inside malloc/new.

Regards,

Andreas


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