Blocks :
|
|
Relates :
|
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 is JDK-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.