sync-primitives
v1.0.1
Published
Synchronization primitives for JavaScript
Downloads
10
Maintainers
Readme
sync-primitives
Installation
npm install sync-primitives
API
Semaphore
constructor
number
[value=1]
acquire
Object
[opts]boolean
[blocking=true]boolean
[timeout=-1]
return: Promise.<boolean>
release
withLock
function
fnObject
[opts]boolean
[blocking=true]boolean
[timeout=-1]
return: Promise.<[boolean, *]>
Condition
...
Event
constructor
isSet
return: boolean
set
clear
wait
number
timeout
return: Promise.<boolean>
Barrier
...
License
Code released under the MIT license.