Ticket #3718: waker.patch
| File waker.patch, 1.1 KB (added by sanxiyn, 4 years ago) |
|---|
-
twisted/internet/posixbase.py
53 53 win32process = None 54 54 55 55 56 class _ Win32Waker(log.Logger, styles.Ephemeral):56 class _SocketWaker(log.Logger, styles.Ephemeral): 57 57 """I am a workaround for the lack of pipes on win32. 58 58 59 59 I am a pair of connected sockets which can wake up the main loop … … 101 101 self.w.close() 102 102 103 103 104 class _ UnixWaker(log.Logger, styles.Ephemeral):104 class _PipeWaker(log.Logger, styles.Ephemeral): 105 105 """This class provides a simple interface to wake up the event loop. 106 106 107 107 This is used by threads or signals to wake up the event loop. … … 152 152 del self.i, self.o 153 153 154 154 155 if platformType == 'posix':156 _Waker = _ UnixWaker157 el if platformType == 'win32':158 _Waker = _ Win32Waker155 if hasattr(os, 'pipe'): 156 _Waker = _PipeWaker 157 else: 158 _Waker = _SocketWaker 159 159 160 160 161 161 class PosixReactorBase(_SignalReactorMixin, ReactorBase):
