Saferphore - Node semaphore with protection against double-returning
# node
npm install --save saferphore
# Browser
bower install --save saferphore
const Saferphore = ; var sem = Saferphore;for var i = 0; i < 10000; i++ sem
You can only return what you take, if you try to call returnAfter() twice then it will throw a clear error instead of creating a leaky semaphore.
sem;