Skip to content
Permalink
Browse files
8273381: Assert in PtrQueueBufferAllocatorTest.stress_free_list_alloc…
…ator_vm

Backport-of: c80a612709f1e483575e2843c1f0ea84e1b9a257
  • Loading branch information
GoeLin committed Feb 1, 2022
1 parent cb769c0 commit c5815984ae0f430eefdf1836d3fb2fbd44f99067
Showing 1 changed file with 7 additions and 1 deletion.
@@ -180,12 +180,18 @@ class BufferNode::TestSupport::ProcessorThread : public JavaTestThread {
{}

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.
}

1 comment on commit c581598

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on c581598 Feb 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.