GlobalCounter presently does not support nesting of critical sections. This can limit its use or lead to contorted usage to avoid nesting. Since supporting nesting is straight-forward and not very expensive, we should add this feature.
An example of a potential problem isJDK-8212826, which proposes to replace the use of an "access" rank lock with a lock-free algorithm that uses GlobalCounter. The lock involved is "access" rank because it can be needed in fairly arbitrary contexts, e.g. anywhere where an Access barrier is needed. Without nesting support, such a use of a GlobalCounter critical section would prevent the use of Access within another critical section. That would be a very unpleasant restriction.
An example of a potential problem is
- blocks
-
JDK-8212826 Make PtrQueue free list lock-free
-
- Resolved
-
- relates to
-
JDK-8213177 GlobalCounter::CSContext could be an enum class
-
- Resolved
-