Make a lock reentrant in the same domain.
Max amount of time allowed between entering the queue and completing execution.
Max number of tasks allowed in the queue at a time.
Allows to enqueue a task in the front of the queue, skipping all enqueued tasks.
Max amount of time an item can remain in the queue before acquiring the lock.
Generated using TypeDoc
Use your own promise library instead of the global
Promise
variable.import AsyncLock = require('async-lock'); import Bluebird = require('bluebird'); import Q = require('q');
new AsyncLock({ Promise: Bluebird }); // Bluebird new AsyncLock({ Promise: Q }); // Q