Locking operations in fastify routes
- Dominant language
- No language data
- Stars
- 68
- Forks
- 8
- Avg merge
- 11h 2m
- Merged PRs (30d)
- 2
Description
Hello!
I am curious about people's thoughts on approaches to handling locking operations within fastify routes. I have a typical lock use case, where I have a global resource (file) that needs to be updated one at a time in response to inbound requests (or drop the request and have the requester retry if the lock is held).
Currently I am using [proper-lockfile](https://www.npmjs.com/package/proper-lockfile) to handle this through a file lock, which works well, but I am wondering if there are any native ways of handling this in fastify that may be more performant. I have looked into [fastify-locks](https://github.com/piscinajs/fastify-locks) but was unable to get it running and unsure if it is still maintained.
Thanks for your time and this excellent project!
Contributor guide
Assessment
This issue has not been assessed yet.