-
Notifications
You must be signed in to change notification settings - Fork 258
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
utils: add a thread-safe single-producer/single-consumer queue #1504
utils: add a thread-safe single-producer/single-consumer queue #1504
Conversation
8bc865c
to
4b4a58e
Compare
d47079e
to
ad0d46d
Compare
ad0d46d
to
790b4c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. However, I still have a lot of comments, ideas and wishes. Feel free to discuss.
I haven't looked at the test yet.
e20a72d
to
2c410da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left a few comments for the test. My main concern is randomness and reproducibility.
The "end-user" API is pretty neat btw.
b5d5ea1
to
74266f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff. Thank you!
736fee4
to
c3c267d
Compare
This wrapper takes care of getting/releasing the (right) locks.
8d096d3
to
a970700
Compare
Thank you for contributing to the Bareos Project!
Adds utilities and data structures that can be used safely in multi-threaded code.
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-tool
to have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests