Skip to content

Commit ca5f229

Browse files
committed
make treatment of main thread more explicit
1 parent 42f874f commit ca5f229

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vpython/no_notebook.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ async def onMessage(self, data, isBinary):
217217
# this will throw a runtime exception after the main Thread
218218
# has stopped, but we don't really case since the main thread
219219
# is no longer there to do anything anyway.
220-
pass
220+
if threading.main_thread().is_alive():
221+
raise
222+
else:
223+
pass
221224

222225
def onClose(self, wasClean, code, reason):
223226
"""Called when browser tab is closed."""

0 commit comments

Comments
 (0)