Skip to content

Commit ae049e8

Browse files
committed
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.
1 parent 53e451f commit ae049e8

File tree

1 file changed

+406
-617
lines changed

1 file changed

+406
-617
lines changed

0 commit comments

Comments
 (0)