DistributedLock
DistributedLock copied to clipboard
FileDistributedLock - Use FileSystemWatcher to optimize wait
We shouldn't rely solely on this (we'll still have a busy wait loop with timeouts), but this can allow us to wake up immediately whenever the lock file is deleted. With this we can have longer back-off times as well.
Potentially this would be a way to build an efficient Semaphore
too.