File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2020
2121import zmq
2222import zmq .asyncio
23- from anyio import create_task_group , run
23+ from anyio import create_task_group , run , to_thread
2424from IPython .core .application import ( # type:ignore[attr-defined]
2525 BaseIPythonApplication ,
2626 base_aliases ,
@@ -791,7 +791,7 @@ def start(self) -> None:
791791 run (self ._start , backend = backend )
792792
793793 async def _wait_to_enter_eventloop (self ) -> None :
794- await self .kernel ._eventloop_set .wait ( )
794+ await to_thread . run_sync ( self .kernel ._eventloop_set .wait )
795795 await self .kernel .enter_eventloop ()
796796
797797 async def main (self ) -> None :
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ def _parent_header(self):
235235 "list_subshell_request" ,
236236 ]
237237
238- _eventloop_set : Event = Event ()
238+ _eventloop_set = threading . Event ()
239239
240240 def __init__ (self , ** kwargs ):
241241 """Initialize the kernel."""
You can’t perform that action at this time.
0 commit comments