Duplicate :
|
|
Relates :
|
In G1 there are many places where code is bracketed by calls to SuspendibleThreadSet::join() and SuspendibleThreadSet::leave() (and vice versa). It'd be helpful to introduce two classes that automatically ensure that the appropriate action is taken at the start and end of such a critical section using the standard idiom of calling the appropriate method in the constructor and destructor of each class (similar to how MutexLocker / MutexUnlocker work).
|