-
Notifications
You must be signed in to change notification settings - Fork 23
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
Comments
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
Introduce a
StampedLockFactory
similar toXMutexFactory
, except instead of generating a synchronization monitor, it would generate aStampedLock
instance. This would be useful for applications that could benefit from the performance characteristics ofStampedLock
: 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 simplerReadWriteLock
interface, require re-entrant capabilities, or need to define whether or not the lock is fair.The text was updated successfully, but these errors were encountered: