Skip to content

Commit cecbf75

Browse files
authored
Update readme.md
Mention that tasks order is not guaranteed
1 parent 4004398 commit cecbf75

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎readme.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ Once `release` function has been called all following calls are no-op, so same f
199199

200200
It's also taken into consideration that an expired lock cannot be released so it does not release the lock from another holder. i.e. if process A acquires the lock, then it expires, then process B acquires the lock. When process A tries to release the lock, it will not be released, as it's now acquired by B.
201201

202+
### No Order Guarantees
203+
This package does not guarantee that waiting tasks will execute in the same order they are waiting, the task that acquires the lock after it's been released is selected at random. See [this issue](https://github.com/AmrSaber/simple-redis-mutex/issues/19) for an example. If you need to guarantee the order, you should use a blocking queue and not a mutex.
204+
202205
### Migration from v1.x
203206
Breaking Changes in v2:
204207
- Redis client is now `redis` and not `ioredis`

0 commit comments

Comments
 (0)