46
46
import java .util .LinkedList ;
47
47
import java .util .List ;
48
48
import java .util .Map ;
49
- import java .util .SortedMap ;
50
49
import java .util .WeakHashMap ;
51
50
import java .util .concurrent .ConcurrentHashMap ;
52
51
import java .util .concurrent .ConcurrentSkipListMap ;
@@ -578,7 +577,7 @@ public static final class SharedMultiprocessingData {
578
577
* Maps the two fake file descriptors created in {@link #pipe()} to one
579
578
* {@link LinkedBlockingQueue}
580
579
*/
581
- private final SortedMap <Integer , LinkedBlockingQueue <Object >> pipeData = new ConcurrentSkipListMap <>();
580
+ private final ConcurrentSkipListMap <Integer , LinkedBlockingQueue <Object >> pipeData = new ConcurrentSkipListMap <>();
582
581
583
582
/**
584
583
* Holds ref count of file descriptors which were passed over to a spawned child context.
@@ -588,7 +587,7 @@ public static final class SharedMultiprocessingData {
588
587
* <li>real file descriptors coming from the posix implementation</li>
589
588
* </ul>
590
589
*/
591
- private final Map <Integer , Integer > fdRefCount = new ConcurrentHashMap <>();
590
+ private final ConcurrentHashMap <Integer , Integer > fdRefCount = new ConcurrentHashMap <>();
592
591
593
592
public SharedMultiprocessingData (ConcurrentHashMap <String , Semaphore > namedSemaphores ) {
594
593
this .namedSemaphores = namedSemaphores ;
@@ -691,10 +690,10 @@ public Object takePipeData(Node node, int fd, Runnable noFDHandler) {
691
690
}
692
691
693
692
/**
694
- * This uses LinkedBlockingQueue #compute to determine the blocking state. The runnable may
695
- * be run multiple times, so we need to check and write all possible results to the result
696
- * array. This ensures that if there is concurrent modification of the {@link #pipeData}, we
697
- * will get a valid result.
693
+ * This uses {@link ConcurrentSkipListMap #compute} to determine the blocking state. The
694
+ * runnable may be run multiple times, so we need to check and write all possible results to
695
+ * the result array. This ensures that if there is concurrent modification of the
696
+ * {@link #pipeData}, we will get a valid result.
698
697
*/
699
698
@ TruffleBoundary
700
699
public boolean isBlocking (int fd ) {
0 commit comments