Stopping threads from the outside

holger at trillke.net holger at trillke.net
Sun Mar 24 10:59:56 EST 2002


> >how could you stop a running threading.Thread from the *outside*? of
> >course i could introduce some kind of flag into the event loop of the
> >Thread.run-method, but i really would prefer to have a non-instrusive
> >way for several reasons.
> >
> >Any way to do this?
> 
> Not really.  Why do you want to do it?

You really want to know it? I am currently working
on (coded) agents which move through the network.

Some Agents want to actively run in a thread
(my http-serving agent for instance). And i would rather not 
impose any restrictions on their event loops. 
But of course i'd sometimes like to shut down some or
all agent-threads. Any ideas? Maybe something 
with signals (one of the areas i have no experience
with)?

Is the questions actually strange in any way? Like something
you wouldn't usually like to do?

	holger




More information about the Python-list mailing list