Skip to content

refactor: use atomics#29

Draft
jdockerty wants to merge 4 commits into
mainfrom
fix/remove-rwlock-on-atomic
Draft

refactor: use atomics#29
jdockerty wants to merge 4 commits into
mainfrom
fix/remove-rwlock-on-atomic

Conversation

@jdockerty

Copy link
Copy Markdown
Owner

Wrapping a usize within an Arc<RwLock<T>> is basically atomics with extra steps. The mutexes/locks build upon atomics and we really only need the value for what is being used here. The extra complexity of wrapping values within locks is not required, we can use atomics directly.

Whether the memory ordering is correct is up for debate, but this is okay for now.

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