This commit is contained in:
João Moreno 2015-11-30 16:41:37 +01:00
Родитель f882c54105
Коммит 7c24cfef9b
1 изменённых файлов: 24 добавлений и 0 удалений

24
README.md Normal file
Просмотреть файл

@ -0,0 +1,24 @@
# windows-mutex
Expose the Windows CreateMutex API to Node.JS.
## Installation
`windows-mutex` will only compile in Windows machines, so it is advisable
to use the `--save-optional` flag and wrap the
`require('windows-mutex')` call in a `try {} catch {}` block, in case your
code also runs on other platforms.
```
npm install --save-optional windows-mutex
```
## Usage
```javascript
import { Mutex } from 'windows-mutex';
var mutex = new Mutex();
console.log(mutex.isActive());
mutex.release();
```