0.0.1 • Published 10 years ago

co-lock v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

co-lock

Asyncronous resources, generator style. Finally, Javascript has deadlocks!

Install

$ npm install co-lock

Usage

var release = yield lock(target);
// critical section
yield release;

API

lock(target, timeout)

Creates a lock on target, yields with release when the lock can be acquired. If cannot acquire lock within timeout, throws error.

License

MIT

0.0.1

10 years ago

0.0.0

10 years ago