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

Support StampedLock #9

Open
l0s opened this issue Jun 22, 2020 · 0 comments
Open

Support StampedLock #9

l0s opened this issue Jun 22, 2020 · 0 comments

Comments

@l0s
Copy link
Contributor

l0s commented Jun 22, 2020

Introduce a StampedLockFactory similar to XMutexFactory, except instead of generating a synchronization monitor, it would generate a StampedLock instance. This would be useful for applications that could benefit from the performance characteristics of StampedLock: https://blog.overops.com/java-8-stampedlocks-vs-readwritelocks-and-synchronized/ . It would also be useful for applications that need read-locking vs. write-locking semantics, i.e. allowing multiple concurrent readers provided there are no writers.

Optional: Also introduce a ReadWriteLockFactory which would be useful for applications that prefer the simpler ReadWriteLock interface, require re-entrant capabilities, or need to define whether or not the lock is fair.

l0s added a commit to l0s/xsync that referenced this issue Jun 22, 2020
This adds two new factories that generate `StampedLock` and
`ReadWriteLock` instances for applications that require more granular
control over locking. The unit tests duplicate the verifications in
`XMutexFactoryImplTest` and also introduce verifications specific to the
synchronisation mechanisms.

Addresses: antkorwin#9
l0s added a commit to l0s/xsync that referenced this issue Jun 22, 2020
This adds two new factories that generate `StampedLock` and
`ReadWriteLock` instances for applications that require more granular
control over locking. The unit tests duplicate the verifications in
`XMutexFactoryImplTest` and also introduce verifications specific to the
synchronisation mechanisms.

Addresses: antkorwin#9
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

No branches or pull requests

1 participant