Jason  Mobarak <[EMAIL PROTECTED]> wrote:
> Why do you want to do this in a thread? What's wrong with
> reactor.callLater?
> 
> import time
> from twisted.internet import reactor
> 
> def shutdown():
> 
>    time.sleep(3)
>    print "stopping"
>    reactor.callFromThread(reactor.stop)
> 
> reactor.callInThread(shutdown)
> reactor.run()

In the app I am playing with, I have a thread that reads from the console.
When it terminates, I wanted it to shut down the reactor and couldn't use
callLater.  However, callFromThread worked perfectly.   I guess I need to
look at the docs some more to understand why its necessary 

-- 
[EMAIL PROTECTED]                       |             Roma Invicta!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to