Skip to content

tradle/psem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psem

simple promise-based semaphore

Install

npm install

Usage

const { go, stop, wait } = createSemaphore()

let waited
setTimeout(go, 100)
setTimeout(() => waited = true, 50)
wait().then(() => console.log('waited', waited))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published