0.0.6 • Published 9 years ago

timeout-semaphore v0.0.6

Weekly downloads
5
License
GPL
Repository
github
Last release
9 years ago

node-timeoutSemaphore

Semaphore with a timeout limit

Install: npm install semaphore

Limit simultaneous access to a resource.

// Create
var sem = require('semaphore')(capacity, timeoutMs_Or_0forInfinity);

// Take
sem.take((leaveFunc) => {
	// Do what you want
	
	var alreadyLeft = leaveFunc();
	// Returns FALSE if the lock has been already released
}
0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago