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

Made mutex member variable mutable #1918

Merged
merged 1 commit into from
Apr 22, 2021
Merged

Made mutex member variable mutable #1918

merged 1 commit into from
Apr 22, 2021

Conversation

matt77hias
Copy link
Contributor

Classes inheriting from base_sink can now lock the base mutex inside their const member methods (e.g., basic accessors).

Classes inheriting from `base_sink` can now lock the base mutex inside their `const` member methods (e.g., basic accessors).
@matt77hias
Copy link
Contributor Author

For example, ringbuffer_sink could have a const member method to retrieve the number of log messages in the buffer, which is simultaneously read from/written to by different threads.

@gabime gabime merged commit 8e3b133 into gabime:v1.x Apr 22, 2021
@gabime
Copy link
Owner

gabime commented Apr 22, 2021

Thanks @matt77hias

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

2 participants