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

Replace CLockFreeGuard with AtomicMutex #1795

Closed
wants to merge 2 commits into from
Closed

Conversation

prasannavl
Copy link
Member

@prasannavl prasannavl commented Mar 3, 2023

/kind fix

  • CLockFreeGuard uses barrier that's unsuitable for general use case, and results in multiple threads entering critical sections due to premature barrier optimizations
  • Additionally, remove the 1ms thread sleep, which on platforms like Linux which default to higher resolution thread quantums might be palatable, but will have heavy regressive behaviour on platforms like Windows which default to 15ms quantum slices.
  • Since CLockFree is primarily used for extremely cheap ops, spin waiting is just simpler // though likely have to reassess it's use cases later on if it's even useful here.

@prasannavl prasannavl changed the title Make CLockFreeGuard safer Replace CLockFreeGuard with AtomicMutex Mar 6, 2023
@prasannavl
Copy link
Member Author

Closed in favor of #1797

@prasannavl prasannavl closed this Mar 6, 2023
@prasannavl prasannavl deleted the pvl/fix-lock-free branch April 10, 2023 18:32
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.

2 participants