named-mutex-js
cross process named mutex
Install
>npm install --save named-mutex
Usage
child.js
const NamedMutex = const mutex = 'testMutex'console
main.js
const NamedMutex = const cp = const mutex = 'testMutex'console // output: trueconst stdout = cpconsole // output: falsemutex // process still release the mutex on leave, even if this line is absent