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

Initial commit for thread-safe cb impl #24

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

enbnt
Copy link
Owner

@enbnt enbnt commented Mar 21, 2023

Start of examples where concurrency and
thread safety concerns are introduced. This
is meant to be an example for a blog post
where we can run jmh benchmarks concurrently
against each solution to determine locking/synchronization
overhead.

The blog should also discuss how https://www.baeldung.com/java-ring-buffer thread-safe
producer consumer is not guaranteed - the access and comparison to both read & write vars is not an atomic operation, which leaves us with some tricky synchronization to ensure accurate results.

TODO:

  • test cases
  • jmh perf benchmarks
  • updated scala docs
  • determine read/timeout semantics for sync version

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