File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1170,6 +1170,7 @@ private void shutdownThreads() {
1170
1170
* This method joins all threads created by this context after the GIL was released. This is
1171
1171
* required by Truffle.
1172
1172
*/
1173
+ @ SuppressWarnings ("deprecation" )
1173
1174
private void joinThreads () {
1174
1175
LOGGER .fine ("joining threads" );
1175
1176
try {
@@ -1192,10 +1193,15 @@ protected void perform(ThreadLocalAction.Access access) {
1192
1193
throw new PythonThreadKillException ();
1193
1194
}
1194
1195
});
1196
+ thread .interrupt ();
1195
1197
thread .join (2 );
1196
1198
}
1197
1199
if (thread .isAlive ()) {
1198
- LOGGER .warning ("could not join thread " + thread .getName ());
1200
+ LOGGER .warning ("Could not join thread " + thread .getName () + ". Trying to kill it." );
1201
+ }
1202
+ thread .stop ();
1203
+ if (thread .isAlive ()) {
1204
+ LOGGER .warning ("Could not kill thread " + thread .getName ());
1199
1205
}
1200
1206
}
1201
1207
}
You can’t perform that action at this time.
0 commit comments