Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLMQ] Improve thread handling #2917

Merged
merged 5 commits into from
Apr 2, 2024

Conversation

panleone
Copy link

@panleone panleone commented Mar 25, 2024

Fix some issues in the LLMQ threads handling, that might be also causing some problems in some tests that randomly fail during the final ShutDown() phase.

First 3 commits are just trivial refactor:
Use unique pointers in place of normal pointers to be consistent with the style used for other llmq managers.

Fourth commit:
In CSigSharesManager the function StopWorkerThread() was being called twice. The wrong call was the one in the destructor which has been removed.
The rest of the diff is basically a copy and paste from net_masternodes.cpp (the variable interruptNet of that file plays the exact same role of the variable interruptSigningShare that I have added).
This new version should be the right way to manage the thread

Fifth commit:
In the chainlock manager split the Init from the Start and the Stop from the Destroy phases, as we do for all other llmq managers.

@panleone panleone added this to the 6.0.0 milestone Mar 25, 2024
@panleone panleone self-assigned this Mar 25, 2024
Copy link
Member

@Duddino Duddino left a comment

Choose a reason for hiding this comment

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

utACK 44116cf

Copy link
Member

@Liquid369 Liquid369 left a comment

Choose a reason for hiding this comment

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

tACK 44116cf

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 44116cf

@Fuzzbawls Fuzzbawls merged commit 7954d0a into PIVX-Project:master Apr 2, 2024
21 checks passed
@panleone panleone deleted the llmq_stop_steps branch April 2, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants