Skip to content

Commit bab558e

Browse files
committed
[GR-54008] Make PythonThreadState#shuttingDown volatile.
PullRequest: graalpython/3328
2 parents 631eade + 95b6934 commit bab558e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

graalpython/com.oracle.graal.python.processor/src/com/oracle/graal/python/processor/CApiBuiltinsProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ private void generateBuiltinRegistry(List<CApiBuiltinDesc> javaBuiltins) throws
617617

618618
lines.add("// @formatter:off");
619619
lines.add("// Checkstyle: stop");
620+
lines.add("// Generated by annotation processor: " + getClass().getName());
620621
lines.add("package %s".formatted("com.oracle.graal.python.builtins.modules.cext;"));
621622
lines.add("");
622623
lines.add("import com.oracle.graal.python.builtins.modules.cext.PythonCextBuiltins.CApiBuiltinExecutable;");

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public enum ProfileEvent {
270270
* A class to store thread-local data mostly like CPython's {@code PyThreadState}.
271271
*/
272272
public static final class PythonThreadState {
273-
private boolean shuttingDown = false;
273+
private volatile boolean shuttingDown = false;
274274

275275
/*
276276
* The reference to the last top frame on the Python stack during interop calls. Initially,

0 commit comments

Comments
 (0)