Skip to content

Commit 931a577

Browse files
committed
make the finish and flush fields which are set from other threads volatile
1 parent 9ef508e commit 931a577

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PosixModuleBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,8 @@ static class PipePump extends Thread {
10491049
private final InputStream in;
10501050
private final OutputStream out;
10511051
private final byte[] buffer;
1052-
private boolean finish;
1053-
private boolean flush;
1052+
private volatile boolean finish;
1053+
private volatile boolean flush;
10541054

10551055
public PipePump(InputStream in, OutputStream out) {
10561056
this.in = in;

0 commit comments

Comments
 (0)