Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

lobster

0.1.0 • Public • Published

lobster provides a very simple FIFO lock primitive.

Usage

var lobstr = require('lobster')
  , lock = lobstr()
 
for (var i = 0; i < 10; i++) {
  lock(function (i, yield) {
    console.log(i)
    setTimeout(yield, 50)
  }.bind(null, i))
}

Keywords

none

install

npm i lobster

Downloadsweekly downloads

3

version

0.1.0

license

none

repository

githubgithub

last publish

collaborators

  • avatar