WaitOrLock takes the lock, but only if none exists for that key. If the Promise is expired, it will successfully replace it and the previous Promise will be resolved.
(key interface{}, ttl time.Duration)
| 19 | // WaitOrLock takes the lock, but only if none exists for that key. |
| 20 | // If the Promise is expired, it will successfully replace it and the previous Promise will be resolved. |
| 21 | WaitOrLock(key interface{}, ttl time.Duration) (promise Promise, gotLock bool) |
| 22 | |
| 23 | // Release unlocks a key and resolved the previous Promise, if any. |
| 24 | Release(key interface{}) |
no outgoing calls