{"library":"lock-queue","type":"library","category":null,"description":"A simple locking mechanism for serializing access to a resource using promises. Version 1.0.1 is the latest stable release. This package provides a Locker class that manages a queue of promise-returning functions, supporting both exclusive and non-exclusive locks. Exclusive locks block all other operations until they complete, while non-exclusive locks run concurrently. This is useful for controlling access to shared resources without full mutex complexity. It has zero runtime dependencies and is designed for Node.js environments (>=0.10.0), with no browser support. Compared to alternatives like async-lock, lock-queue offers a minimal API focused on queue-based serialization with concurrency support for non-exclusive tasks.","language":"javascript","status":"active","version":"1.0.1","tags":["javascript","lock","queue","locker","locked","release","unlock","async","series"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install lock-queue","imports":["const Locker = require('lock-queue');","locker.run(fn, ctx);","locker.lock(fn, ctx);"]},{"cmd":"yarn add lock-queue","imports":[]},{"cmd":"pnpm add lock-queue","imports":[]}],"homepage":"https://github.com/overlookmotel/lock-queue#readme","github":"https://github.com/overlookmotel/lock-queue","docs":null,"changelog":null,"pypi":null,"npm":"lock-queue","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}