[Twisted-Python] pollreactor 1sec timeout

andrea at cpushare.com andrea at cpushare.com
Wed Nov 24 02:35:28 MST 2004


Hello,

Why is the pollreactor rescheduling once per second? I modified it like
this and it still works so far.

--- Twisted/twisted/internet/pollreactor.py.~1~	2004-11-23 03:48:21.000000000 +0100
+++ Twisted/twisted/internet/pollreactor.py	2004-11-24 07:59:30.508119608 +0100
@@ -120,9 +120,7 @@ class PollReactor(default.PosixReactorBa
                POLLIN=select.POLLIN,
                POLLOUT=select.POLLOUT):
         """Poll the poller for new events."""
-        if timeout is None:
-            timeout = 1000
-        else:
+        if timeout is not None:
             timeout = int(timeout * 1000) # convert seconds to milliseconds
 
         try:




More information about the Twisted-Python mailing list