mr_organic wrote:
>>> If you do a 'return' to the run() method, that stops the thread.
>>
>> Yes of course, but the OP's question was how to stop the thread *when
>> the run method does not return*.
>>
>> -- chris
>>
>
> If you keep a reference to the thread id (a numeric, I think), you should
> be able to kill() that thread, yes? So you put a timer or a semaphore on
> the thread, and if it doesn't complete within the given parameters, you
> issue a kill().
>
> mr_organic
That might be kind of hard to do, considering that Thread does not have a
kill() method.
It does have a destroy() method, but that has never been implemented.
--
Kind regards,
Christophe Vanfleteren
|