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

Use spin-locks when possible. #713

Merged
merged 2 commits into from
Mar 3, 2019
Merged

Use spin-locks when possible. #713

merged 2 commits into from
Mar 3, 2019

Conversation

vsonnier
Copy link
Collaborator

@vsonnier vsonnier commented Mar 3, 2019

In Cubic, we have quite a number of locks. Number of them are actually non-recursive std::mutex and are protecting very small and short-lived regions.

Replaced them by spin-locks. A notable exception is ThreadBlockingQueue where we want blocking with sleep semantics and we can't use a spin-loop.

Shamelessly copied from (my) work done on pothosware/SoapyPlutoSDR#14 for the PlutoSDR plugin.

@vsonnier vsonnier merged commit 8b0d4c2 into master Mar 3, 2019
@cjcliffe cjcliffe deleted the vso_use_spin_locks branch March 15, 2019 01:14
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.

1 participant