Skip to content

Commit 3829393

Browse files
committed
Refuse to start from multithreaded polyglot programs
Avoids a NPE when being started from multithreaded polyglot programs. Since we don't have proper threading support, it just quits with a more appropriate error. Resolves #120
1 parent 3daa036 commit 3829393

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/PythonLanguage.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ protected boolean isThreadAccessAllowed(Thread thread, boolean singleThreaded) {
582582
if (singleThreaded) {
583583
return super.isThreadAccessAllowed(thread, singleThreaded);
584584
}
585+
if (isWithThread == null) {
586+
isWithThread = false;
587+
}
585588
return isWithThread;
586589
}
587590

0 commit comments

Comments
 (0)