On 5/22/06, Peter N. Lundblad <[EMAIL PROTECTED]> wrote:
Greg Stein writes: > On 5/22/06, Garrett Rooney <[EMAIL PROTECTED]> wrote: > > On 5/19/06, Weihan Wang <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I didn't see thread cancellation API but did see some code segments of > > > APR that intend to implement it. Will APR API support cancellation in > > > the near future? Thanks. > > > > I don't know of anyone working on such a feature for APR. > > Right. Generally, cancellation is considered very unsafe. Most APIs > nowadays do not support it. > Does this also apply to synchronous cancelation?
Define "synchronous cancelation". In my experience, anything that goes out and kills a thread without giving it a chance to clean up (and pthread_cleanup_push/pthread_cleanup_pop don't count, IMO) is a bad thing. If you need the ability to cancel a running thread you should be setting up a way to communicate to the thread that it should exit, and letting it do so. -garrett -garrett
