Last active
October 31, 2017 22:39
-
-
Save jdx/d8e8910e9668ba3a12e00da3c488964c to your computer and use it in GitHub Desktop.
windows lockfile contention repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rwlockfile = require('./src/rwlockfile') | |
rwlockfile.read('foo') | |
console.log('unread foo in 10s') | |
setTimeout(() => { | |
console.log('unreading foo') | |
rwlockfile.unread('foo') | |
}, 10000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rwlockfile = require('./src/rwlockfile') | |
rwlockfile.read('foo') | |
.then(() => { | |
rwlockfile.write('foo', {skipOwnPid: true}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment