dominictarr/lock — pull request #3 by jfromaniello (2013-02-07 19:03:05+00:00)
Title: problem when releasing second lock

I am having a problem, I did this test:

1. lock(a) three times, and do not release first lock until the next tick.
2. release first time, then second function get executed.
3. release second time, and here something weird happen because ```exec``` is the first wraped function and not the second one... and the first one was already released, then ```if(!~i) return``` happen and the third function that was waiting never get called. Moreover next time i call lock('a', nothing happen because 'a' is still locked

I think i found the problem, but i am not sure.

This test will fail in an new file because t.end() never get called, but I tried to put this inside ```tests/index.js``` and it doesn't fail. I am not familiar with tape.

thanks