sync: Rewrite the base primitives
This commit rewrites the core primitives of the sync library: Mutex, RWLock, and Semaphore. These primitives now have updated, more modernized apis: * Guards are returned instead of locking with closures. All condition variables have moved inside the guards and extraneous methods have been removed. * Downgrading on an rwlock is now done through the guard instead of the rwlock itself. These types are meant to be general locks, not locks of an internal type (for external usage). New types will be introduced for locking shared data.
This commit is contained in:
parent
53e451f410
commit
ae049e82f8
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user