Closed bmrpatel closed 2 years ago
I would prefer features that can be easily implemented outside of this library to do so. The occupation time can be easily implemented with Promise.race, setTimeout, and lock.release.
A timeout for acquiring the lock might make sense to implement internally.
v2.2.0 and up supports an optional timeout
field passed into acquireAsync
. Occupation time can be implemented in user space and won't be added to this library.
similar to async-lock library, please implement timeout and maxOccupationTime
timeout -> timed out error will be returned here if lock not acquired in given time maxOccupationTime -> occupation time exceeded error will be returned here if job not completed in given time