Skip to content

Commit

Permalink
Back to top-level tornado IOLoop (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk authored Jun 15, 2022
1 parent d5eb513 commit 5c1adca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ipykernel/control.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from threading import Thread

from tornado.platform.asyncio import AsyncIOLoop
from tornado.ioloop import IOLoop


class ControlThread(Thread):
def __init__(self, **kwargs):
Thread.__init__(self, name="Control", **kwargs)
self.io_loop = AsyncIOLoop(make_current=False)
self.io_loop = IOLoop(make_current=False)
self.pydev_do_not_trace = True
self.is_pydev_daemon_thread = True

Expand Down
7 changes: 2 additions & 5 deletions ipykernel/iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@

import zmq
from jupyter_client.session import extract_header

# AsyncIOLoop always creates a new asyncio event loop,
# rather than the default AsyncIOMainLoop
from tornado.platform.asyncio import AsyncIOLoop
from tornado.ioloop import IOLoop
from zmq.eventloop.zmqstream import ZMQStream

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -60,7 +57,7 @@ def __init__(self, socket, pipe=False):
self.background_socket = BackgroundSocket(self)
self._master_pid = os.getpid()
self._pipe_flag = pipe
self.io_loop = AsyncIOLoop(make_current=False)
self.io_loop = IOLoop(make_current=False)
if pipe:
self._setup_pipe_in()
self._local = threading.local()
Expand Down

0 comments on commit 5c1adca

Please sign in to comment.