Skip to content

Stateful file descriptor locks for JavaScript

License

Notifications You must be signed in to change notification settings

holepunchto/fd-lock

Repository files navigation

fd-lock

Stateful file descriptor locks for JavaScript.

npm i fd-lock

Usage

const FDLock = require('fd-lock')

const lock = new FDLock(fd, { wait: true })
await lock.ready()

// Lock is now held

await lock.close()

License

Apache-2.0

About

Stateful file descriptor locks for JavaScript

Resources

License

Stars

Watchers

Forks

Contributors