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.
2 parents 378af4b + 730a812 commit 268984fCopy full SHA for 268984f
ipykernel/iostream.py
@@ -455,7 +455,12 @@ def flush(self):
455
456
send will happen in the background thread
457
"""
458
- if self.pub_thread and self.pub_thread.thread is not None and self.pub_thread.thread.is_alive():
+ if (
459
+ self.pub_thread
460
+ and self.pub_thread.thread is not None
461
+ and self.pub_thread.thread.is_alive()
462
+ and self.pub_thread.thread.ident != threading.current_thread().ident
463
+ ):
464
# request flush on the background thread
465
self.pub_thread.schedule(self._flush)
466
# wait for flush to actually get through, if we can.
0 commit comments