mutex-pro-max

2.0.2 • Public • Published

mutex-pro-max

Queue with multi lock mutex.

Installation

npm install mutex-pro-max

Usage

.queueSize()

Returns: number
Returns the remaining length of queues.

.enqueue

Type: fn()
Adds functions to the current queue to be executed later in a FIFO order.

.clearQueue()

Empties the current queue.

.lock()

Lock the current queue until .release() is called to release the lock.
Note: The size of .lock() is propotional to .release()'s, .release() is needed to called as many times as .lock() in order to execute.

.release()

Releases the current queue.

.isLocked()

Returns: boolean
Returns the state of the current queue.

.lockSize()

Returns: number
Returns the size of .lock()

.releaseAll()

Releases all .lock()

Readme

Keywords

Package Sidebar

Install

npm i mutex-pro-max

Weekly Downloads

0

Version

2.0.2

License

ISC

Unpacked Size

13.4 kB

Total Files

18

Last publish

Collaborators

  • alphabetq