summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-10-02 16:40:05 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-10-02 16:40:05 +0200
commit71ee4b6f9d6afc1d93ddc3b22929af36d6dabe4b (patch)
treeaa8d7e5169ab6fb9886a61cf489da7e6a8a23034
parentaecc8efb685fa2df0b3dcb6f1e18cdea0c9562f2 (diff)
downloadtrollius-71ee4b6f9d6afc1d93ddc3b22929af36d6dabe4b.tar.gz
Fix _run_once() for removing delayed calls
-rw-r--r--trollius/base_events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/trollius/base_events.py b/trollius/base_events.py
index 2b6a868..9953734 100644
--- a/trollius/base_events.py
+++ b/trollius/base_events.py
@@ -1013,7 +1013,7 @@ class BaseEventLoop(events.AbstractEventLoop):
# Remove delayed calls that were cancelled if their number is too high
sched_count = len(self._scheduled)
if (sched_count > _MIN_SCHEDULED_TIMER_HANDLES and
- self._timer_cancelled_count / sched_count >
+ float(self._timer_cancelled_count) / sched_count >
_MIN_CANCELLED_TIMER_HANDLES_FRACTION):
for handle in self._scheduled:
if handle._cancelled: