lobster

very simple FIFO lock primitive

npm install lobster
1 downloads in the last week
4 downloads in the last month

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))
}
npm loves you