sync-primitives
Installation
npm install sync-primitivesAPI
Semaphore
constructor
number[value=1]
acquire
Object[opts]boolean[blocking=true]boolean[timeout=-1]
return: Promise.<boolean>
release
withLock
functionfnObject[opts]boolean[blocking=true]boolean[timeout=-1]
return: Promise.<[boolean, *]>
Condition
...
Event
constructor
isSet
return: boolean
set
clear
wait
numbertimeout
return: Promise.<boolean>
Barrier
...
License
Code released under the MIT license.
