ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosen, Alex" <>
Subject RE: Stopping/Killing a task ?
Date Thu, 22 Feb 2001 16:20:12 GMT
I'm not too clear on what you're trying to do, but there's an excerpt from Doug
Lea's book that might help:

Here's my take on cancellation: If you're the one writing the code that needs
to be cancelled, you should use the periodically-check-for-cancel mechanism he
suggests. If not, you can't, so Thread.stop() is the only alternative. I think
the only problem with calling stop() is that the objects used by that thread
might be left in an inconsistent state. However, if you're planning on throwing
those objects away anyway, it seems like this should be a safe operation.


View raw message