Compensate when Pinned
emoryzheng(郑淼)
emoryzheng at tencent.com
Thu Oct 28 03:00:28 UTC 2021
Hello,
We have a test case about Loom, it can pass before;
The test case can be seen on attach file;
But it cannot pass after this patch:
```
commit de90a43c7a5f0b28bd0af9271de210475808ca0c
Author: Alan Bateman <alan.bateman at oracle.com>
Date: Wed Sep 1 09:22:23 2021 +0100
Replace lock/condition objects to simplify pinned park
```
Actually, this modify cause the test fail, because getCondition.await() will call tryCompensate() of ForkJoinPool eventually:
+ private void parkOnCarrierThread(long nanos) {
···
- if (!parkPermit) {
- // wait to be signalled or interrupted
- getCondition().await();
···
+ if (!parkPermit) {
+ U.park(false, nanos);
}
If there are 4 ForkJoinWorkerThread, and they are all pinned, how to make vt work correct?
Thanks,
Miao
More information about the loom-dev
mailing list