Possible language changes
Doug Lea
dl at cs.oswego.edu
Tue Mar 8 00:27:07 GMT 2005
> Just to reiterate a relatively minor point, and make sure I'm not
> confused:
>
> It seems to me that the Java notion of cancellation on a future
> is actually rather conservative compared to pthreads. Setting
> mayInterruptIfRunning corresponds to a pthread cancellation
> type of PTHREAD_CANCEL_DEFERRED. There is no equivalent of
> PTHREAD_CANCEL_ASYNCHRONOUS (which is almost always unsafe).
>
Yes, exactly so. (Well, almost exactly. There are some java IO
methods that on some platforms actually async-cancel on
interrupt.)
-Doug
More information about the cpp-threads
mailing list