Ticket #5378 defect new
Opened 19 months ago
ctrl-c with win32eventreactor waits until next reactor iteration
| Reported by: | ivank | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | ivank | Branch: | |
| Author: | Launchpad Bug: |
Description
When I hit ctrl-c in a Twisted program running on win32eventreactor, it waits until the next reactor iteration before stopping the reactor. Having a LoopingCall leads to faster processing of the ctrl-c.
I'm using this workaround:
def main(): import win32api def onExit(sig, func=None): reactor.callFromThread(reactor.stop) return 1 win32api.SetConsoleCtrlHandler(onExit, True) ... reactor.run()
I'm using Twisted trunk r33098, CPython 2.7.1 32-bit on Windows 2008R2 SP1.
Note: See
TracTickets for help on using
tickets.
