Skip to content

Fix processing_queue stop#4082

Merged
pwojcikdev merged 2 commits intonanocurrency:developfrom
pwojcikdev:fix-processing-queue-stop
Jan 30, 2023
Merged

Fix processing_queue stop#4082
pwojcikdev merged 2 commits intonanocurrency:developfrom
pwojcikdev:fix-processing-queue-stop

Conversation

@pwojcikdev
Copy link
Copy Markdown
Contributor

Deadlocks were possible during node stopping due to invalid stop logic.

ASSERT_ALWAYS (1s, processed == 1);
ASSERT_EQ (queue.size (), 0);

queue.stop ();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe these will cause a segfault if the test fails. Since the call to stop is no longer associated with a destructor.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

True, if it fails it will be messy. I added a RAII wrapper that ensures stop will always be called

@pwojcikdev pwojcikdev merged commit 7e9f6e8 into nanocurrency:develop Jan 30, 2023
@thsfs thsfs added the bug label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants