8273381: Assert in PtrQueueBufferAllocatorTest.stress_free_list_allocator_vm
Reviewed-by: sjohanss, tschatzl
This commit is contained in:
parent
9759fcb17b
commit
c80a612709
@ -180,12 +180,18 @@ public:
|
||||
{}
|
||||
|
||||
virtual void main_run() {
|
||||
bool shutdown_requested = false;
|
||||
while (true) {
|
||||
BufferNode* node = _cbl->pop();
|
||||
if (node != NULL) {
|
||||
_allocator->release(node);
|
||||
} else if (!Atomic::load_acquire(_continue_running)) {
|
||||
} else if (shutdown_requested) {
|
||||
return;
|
||||
} else if (!Atomic::load_acquire(_continue_running)) {
|
||||
// To avoid a race that could leave buffers in the list after this
|
||||
// thread has shut down, continue processing until the list is empty
|
||||
// *after* the shut down request has been received.
|
||||
shutdown_requested = true;
|
||||
}
|
||||
ThreadBlockInVM tbiv(this); // Safepoint check.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user