Relates :
|
|
Relates :
|
|
Relates :
|
When using virtual thread, the juc unpark event may not be executed and the whole application will wait forever. I have constructed a simple testcase to emulate the situation. I put the two files in the test/jdk/java/lang/Thread/virtual/ and run jtreg test it. The fail rate is 13/30. I find that there may be a problem in ForkJoinPool.java. The `signalWork` may choose do nothing when (c >>> RC_SHIFT) >= pc. (In the testcase, 29 threads are pinned and one is free for doing some work.) And the one active thread which is in the first lines of the function `awaitWork` (before change the ctl) will not be signaled and choose to park.
|