Skip to content

fanatid/sync-primitives

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sync-primitives

build status Coverage Status Dependency status Dev Dependency status

NPM js-standard-style

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 fn
  • Object [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.

About

Synchronization primitives for JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published