mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-22 22:01:08 +00:00
The closed variable in OrtEnvironment should be volatile to ensure threads see changes to it.
This commit is contained in:
parent
4cc0031177
commit
c23bd93ea5
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ public class OrtEnvironment implements AutoCloseable {
|
|||
|
||||
final OrtAllocator defaultAllocator;
|
||||
|
||||
private boolean closed = false;
|
||||
private volatile boolean closed = false;
|
||||
|
||||
/**
|
||||
* Create an OrtEnvironment using a default name.
|
||||
|
|
|
|||
Loading…
Reference in a new issue