Package Exports
- bmutex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bmutex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bmutex
Mutex locks for javascript.
Usage
const {Lock} = require('bmutex');
const lock = Lock.create();
async function doSomething() {
const unlock = await lock();
try {
await _doSomething();
} finally {
unlock();
}
}
async function _doSomething() {
// actually do something async
}Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. </legalese>
License
- Copyright (c) 2017, Christopher Jeffrey (MIT License).
See LICENSE for more info.