Show More
@@ -408,9 +408,11 b' class MTInteractiveShell(InteractiveShell):' | |||||
408 | # section, so we have to acquire the lock with non-blocking semantics, |
|
408 | # section, so we have to acquire the lock with non-blocking semantics, | |
409 | # else we deadlock. |
|
409 | # else we deadlock. | |
410 |
|
410 | |||
411 |
# shortcut - if we are in worker thread, |
|
411 | # shortcut - if we are in worker thread, or the worker thread is not running, | |
|
412 | # execute directly (to allow recursion and prevent deadlock if code is run early | |||
|
413 | # in IPython construction) | |||
412 |
|
414 | |||
413 | if self.worker_ident == thread.get_ident(): |
|
415 | if self.worker_ident is None or self.worker_ident == thread.get_ident(): | |
414 | InteractiveShell.runcode(self,code) |
|
416 | InteractiveShell.runcode(self,code) | |
415 | return |
|
417 | return | |
416 |
|
418 |
General Comments 0
You need to be logged in to leave comments.
Login now