We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81e10a0 commit 6b4b0b5Copy full SHA for 6b4b0b5
ipykernel/kernelbase.py
@@ -257,14 +257,14 @@ async def _flush_control_queue(self):
257
control_loop = self.io_loop
258
tracer_future = awaitable_future = asyncio.Future()
259
260
- def _flush():
+ async def _flush():
261
# control_stream.flush puts messages on the queue
262
self.control_stream.flush()
263
# put Future on the queue after all of those,
264
# so we can wait for all queued messages to be processed
265
- self.control_queue.put(tracer_future)
+ await self.control_queue.put(tracer_future)
266
267
- control_loop.call_soon_threadsafe(_flush)
+ asyncio.run_coroutine_threadsafe(_flush(), control_loop)
268
return awaitable_future
269
270
async def process_control(self, msg):
0 commit comments