Skip to content

Create pool to limit the preemption of resource.

Notifications You must be signed in to change notification settings

Thief-K/easy-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Pool

Create pool to limit the preemption of resource.

Install

npm

npm install @konper/easy-pool

yarn

yarn add @konper/easy-pool

Usage

const foo = (cb) => {
  // touch resource here
  // ...
  // done
  cb()
}

const pool = new Pool([size = 5])
pool.push(foo)

Event

pool.on(event, callback)
  • done: triggered when size became 0.

About

Create pool to limit the preemption of resource.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published