0.0.6 • Published 10 years ago

timeout-semaphore v0.0.6

Weekly downloads
5
License
GPL
Repository
github
Last release
10 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

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago