Skip to content

Initial commit for thread-safe cb impl#24

Draft
enbnt wants to merge 1 commit into
mainfrom
enbnt-circularbuffer-concurrency
Draft

Initial commit for thread-safe cb impl#24
enbnt wants to merge 1 commit into
mainfrom
enbnt-circularbuffer-concurrency

Conversation

@enbnt

@enbnt enbnt commented Mar 21, 2023

Copy link
Copy Markdown
Owner

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