ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <>
Subject Re: Stopping/Killing a task ?
Date Thu, 22 Feb 2001 18:52:25 GMT
Hi Alex,

Thanks for your answer. Here are some more details :
- Assume I can't change the code to check for cancels (which I agree is the
best way to do it !),
- The thread that I want to kill spawns a process in another JVM (that's the
Ant java task) and when I call stop() on the thread that started this other
JVM, it does not stop this other JVM

I have come to the conclusion that there is no simple way to do it ... But
if anyone has a clue ... :)

----- Original Message -----
From: "Rosen, Alex" <>
To: <>
Sent: Thursday, February 22, 2001 5:20 PM
Subject: RE: Stopping/Killing a task ?

> I'm not too clear on what you're trying to do, but there's an excerpt from
> Lea's book that might help:
> Here's my take on cancellation: If you're the one writing the code that
> 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
> the only problem with calling stop() is that the objects used by that
> might be left in an inconsistent state. However, if you're planning on
> those objects away anyway, it seems like this should be a safe operation.
> --Alex
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message