Skip to content

Instantly share code, notes, and snippets.

@jdx
Last active October 31, 2017 22:39
Show Gist options
  • Save jdx/d8e8910e9668ba3a12e00da3c488964c to your computer and use it in GitHub Desktop.
Save jdx/d8e8910e9668ba3a12e00da3c488964c to your computer and use it in GitHub Desktop.
windows lockfile contention repro
const rwlockfile = require('./src/rwlockfile')
rwlockfile.read('foo')
console.log('unread foo in 10s')
setTimeout(() => {
console.log('unreading foo')
rwlockfile.unread('foo')
}, 10000)
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