Stopping threads from the outside
Boudewijn Rempt
boud at valdyas.org
Sun Mar 24 17:14:44 EST 2002
Peter Hansen wrote:
>
> I'm curious what the agent actually does if it doesn't share
> anything. Does it not take input? And produce output?
> No opening files, accessing Queues and such? If it does
> any of those things, wouldn't that make it potentially a
> problem if you killed it?
>
Sending and receiving messages -- messages which are, very
carefully, _not_ shared objects.
> I realize it may be only a theoretical problem in some specific
> applications, since one might be able to guarantee that one will
> not attempt to kill a thread when it is in a particular subroutine
> and therefore unsafe. It might be nice to have the option, if
> one really wanted, especially if there are simple conditions
> under which one could guarantee a thread is safe to kill (not
> blocking and without shared resources locked).
>
It would be _very_ nice.
--
Boudewijn Rempt | http://www.valdyas.org
More information about the Python-list
mailing list