Ticket #3011 (closed defect: fixed)
reactor.callWhenRunning(reactor.stop); reactor.run() doesn't work on glib2reactor
| Reported by: | radix | Owned by: | radix |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | Branch: | branches/gtk2-callWhenRunning-stop-3011 | |
| Author: | radix | Launchpad Bug: |
Description
callWhenRunning generally works, but for some reason you cannot effectively shut down the reactor with it in glib2reactor. It's clearly being invoked and getting the reactor into the "I am not running" state, but reactor.run() doesn't return.
Python 2.4.4 (#2, Jan 3 2008, 14:46:51)
[GCC 4.2.3 20071223 (prerelease) (Ubuntu 4.2.2-4ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.internet.glib2reactor import install
>>> install()
>>> from twisted.internet import reactor
>>> reactor.callWhenRunning(reactor.stop)
('startup', ('after', <bound method Glib2Reactor.stop of <twisted.internet.glib2reactor.Glib2Reactor object at 0xb7d5f0cc>>, (), {}))
>>> reactor.run()
If I hit ctrl+c here, I get a "can't stop reactor that isn't running" exception.
Change History
Note: See
TracTickets for help on using
tickets.
