Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

[FEATURE] Refresh Locks #35

Closed
aikar opened this issue Nov 5, 2019 · 1 comment
Closed

[FEATURE] Refresh Locks #35

aikar opened this issue Nov 5, 2019 · 1 comment

Comments

@aikar
Copy link

aikar commented Nov 5, 2019

What / Why

Requesting that lock staleness always be checked by mtime for all platforms, and the ability to keep a lock refreshed by routinely touching it.

Example

lockfile.lock(file, {stale: 30000, refresh: 1000, retry: 1000*60}, (err) => {

});

While the lock is open routinely do fs.touch, then mtime (as used by windows) will recognize the lock is not stale. Unlock should then stop the active timer.

@aikar
Copy link
Author

aikar commented Nov 5, 2019

Oh I see #12 is essentially this, just worded differently.

@aikar aikar closed this as completed Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant