File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1+ # coding: utf-8
12"""Wrappers for forwarding stdout/stderr over zmq"""
23
34# Copyright (c) IPython Development Team.
@@ -245,9 +246,11 @@ def _schedule_flush(self):
245246 # non-None to avoid races while waiting for _schedule
246247 self ._flush_timeout = 'placeholder'
247248
248- # call_later has to be handed to the io thread with add_callback
249+ # add_timeout has to be handed to the io thread with add_callback
249250 def _schedule_in_thread ():
250- self ._flush_timeout = self ._io_loop .call_later (self .flush_interval , self ._flush )
251+ # FIXME: call_later is a little nicer, if we can require tornado ≥ 4
252+ self ._flush_timeout = self ._io_loop .add_timeout (
253+ self ._io_loop .time () + self .flush_interval , self ._flush )
251254 self ._io_loop .add_callback (_schedule_in_thread )
252255
253256 def flush (self ):
You can’t perform that action at this time.
0 commit comments