@@ -468,7 +468,7 @@ public Thread getOwner() {
468
468
public static final String CHILD_CONTEXT_DATA = "childContextData" ;
469
469
@ CompilationFinal private List <Integer > childContextFDs ;
470
470
private final ChildContextData childContextData ;
471
- private final SharedContextData sharedContextData ;
471
+ private final SharedMultiprocessingData sharedMultiprocessingData ;
472
472
473
473
public static final class ChildContextData {
474
474
private int exitCode = 0 ;
@@ -519,7 +519,7 @@ public boolean compareAndSetExiting(boolean expect, boolean update) {
519
519
}
520
520
}
521
521
522
- public static final class SharedContextData {
522
+ public static final class SharedMultiprocessingData {
523
523
524
524
private int fdCounter = 0 ;
525
525
@@ -552,7 +552,7 @@ private void incrementFDRefCount(int fd) {
552
552
/**
553
553
* Decreases reference count for the given file descriptor.
554
554
*
555
- * @return {@code true} if ref count was decreased, {@link false} if ref count isn't tracked
555
+ * @return {@code true} if ref count was decreased, {@code false} if ref count isn't tracked
556
556
* anymore.
557
557
*/
558
558
@ TruffleBoundary
@@ -676,7 +676,7 @@ public PythonContext(PythonLanguage language, TruffleLanguage.Env env, Python3Co
676
676
this .core = core ;
677
677
this .env = env ;
678
678
this .childContextData = (ChildContextData ) env .getConfig ().get (CHILD_CONTEXT_DATA );
679
- this .sharedContextData = this .childContextData == null ? new SharedContextData () : childContextData .parentCtx .sharedContextData ;
679
+ this .sharedMultiprocessingData = this .childContextData == null ? new SharedMultiprocessingData () : childContextData .parentCtx .sharedMultiprocessingData ;
680
680
this .handler = new AsyncHandler (this );
681
681
this .sharedFinalizer = new AsyncHandler .SharedFinalizer (this );
682
682
this .optionValues = PythonOptions .createOptionValuesStorage (env );
@@ -706,8 +706,8 @@ public ChildContextData getChildContextData() {
706
706
return childContextData ;
707
707
}
708
708
709
- public SharedContextData getSharedContextData () {
710
- return sharedContextData ;
709
+ public SharedMultiprocessingData getSharedMultiprocessingData () {
710
+ return sharedMultiprocessingData ;
711
711
}
712
712
713
713
public long spawnTruffleContext (int fd , int sentinel , int [] fdsToKeep ) {
@@ -728,7 +728,7 @@ public long spawnTruffleContext(int fd, int sentinel, int[] fdsToKeep) {
728
728
for (int fdToKeep : fdsToKeep ) {
729
729
// prevent file descriptors from being closed when passed to another "process",
730
730
// equivalent to fds_to_keep arg in posix fork_exec
731
- getSharedContextData ().incrementFDRefCount (fdToKeep );
731
+ getSharedMultiprocessingData ().incrementFDRefCount (fdToKeep );
732
732
}
733
733
start (thread );
734
734
return tid ;
@@ -786,7 +786,7 @@ public void run() {
786
786
LOGGER .log (Level .FINE , t , () -> "exception while closing spawned child context" );
787
787
}
788
788
}
789
- data .parentCtx .sharedContextData .closePipe (sentinel );
789
+ data .parentCtx .sharedMultiprocessingData .closePipe (sentinel );
790
790
}
791
791
} catch (ThreadDeath td ) {
792
792
// as a result of of TruffleContext.closeCancelled()
@@ -1403,8 +1403,8 @@ public void finalizeContext() {
1403
1403
}
1404
1404
cleanupHPyResources ();
1405
1405
for (int fd : getChildContextFDs ()) {
1406
- if (!getSharedContextData ().decrementFDRefCount (fd )) {
1407
- getSharedContextData ().closePipe (fd );
1406
+ if (!getSharedMultiprocessingData ().decrementFDRefCount (fd )) {
1407
+ getSharedMultiprocessingData ().closePipe (fd );
1408
1408
}
1409
1409
}
1410
1410
mainThread = null ;
0 commit comments