1.0.1 • Published 8 years ago

isi-q v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

q extensions and helpers

Methods

contructur()

contructur(maxAmount, timeout)

Options:

  • maxAmount:
  • timeout:

description comes here

How to use()

reserveSemaphore() and resolveSemaphore()

Example:

var isiQ = require('isi-q')
var QSemaphore = new isiQ(5, 50);

for(var i = 0; i < 10; ++i){
    var operation = QSemaphore.reserveSemaphore();
    operation.then(function(){
        console.log('free semaphore reserved');
    })
    operation.then( myClass.work1 );
    operation.then( myClass.work2 );
    operation.then( eiSem.resolveSemaphore.bind(this) );
}
1.0.1

8 years ago

1.0.0

8 years ago