UNPKG

zero-overhead-promise-lock

Version:

An efficient Promise lock for Node.js projects, ensuring mutually exclusive execution of asynchronous tasks. Key features include a backpressure indicator, access to the currently executing task promise for smart reuse (useful when launching a duplicate t

74 lines (73 loc) 2.06 kB
{ "name": "zero-overhead-promise-lock", "version": "1.2.1", "description": "An efficient Promise lock for Node.js projects, ensuring mutually exclusive execution of asynchronous tasks. Key features include a backpressure indicator, access to the currently executing task promise for smart reuse (useful when launching a duplicate task would be wasteful), and the ability to gracefully await the completion of all currently executing or pending tasks - making it ideal for robust production applications requiring smooth teardown.", "repository": { "type": "git", "url": "git+https://github.com/ori88c/zero-overhead-promise-lock.git" }, "contributors": [ "Ori Cohen (https://github.com/ori88c/)" ], "homepage": "https://github.com/ori88c/zero-overhead-promise-lock#readme", "author": "Ori Cohen", "license": "Apache-2.0", "scripts": { "build": "tsc", "prepare": "npm run build", "test": "jest" }, "keywords": [ "lock", "async-lock", "mutex", "promise-lock", "event-loop-lock", "async-task-lock", "race-condition", "critical-section", "mutually-exclusive", "backpressure", "backpressure-indicator", "graceful-termination", "graceful-teardown", "graceful-shutdown", "clean-teardown", "smooth-teardown", "disposable", "check-and-abort", "access-ongoing-task", "access-executing-promise", "smart-reuse", "avoid-redundant-executions", "advanced-usage-patterns", "event-loop-iterations", "is-available", "check-and-abort", "throttle", "rate-limiting", "nodejs", "Node.js", "typescript", "ts", "ES2020" ], "engines": { "node": ">=14.5.0" }, "devDependencies": { "@types/jest": "^29.5.12", "jest": "^29.7.0", "ts-jest": "^29.1.5", "ts-node": "^10.9.2", "typescript": "^5.5.2" }, "types": "./dist/zero-overhead-promise-lock.d.ts", "main": "./dist/zero-overhead-promise-lock.js", "files": [ "src/", "dist/", "README.md", "LICENSE" ] }