Skip to content

Commit 78980fb

Browse files
committed
cannot join your own thread
1 parent 317f703 commit 78980fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vpython/no_notebook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ def stop_server():
362362
# check to see if the event loop is still going, if so join it.
363363
#
364364
if __t.is_alive():
365-
__t.join()
365+
if threading.get_ident() != __t.ident:
366+
__t.join()
366367

367368
# If the main thread has already stopped, the python interpreter
368369
# is likely just running .join on the two remaining threads (in

0 commit comments

Comments
 (0)