summaryrefslogtreecommitdiff
path: root/CHANGES
diff options
context:
space:
mode:
authorColas Le Guernic <clslgrnc@users.noreply.github.com>2020-01-23 21:52:17 +0100
committerAndy McCurdy <andy@andymccurdy.com>2020-02-24 11:38:29 -0800
commit03260002ded57223c5d05b2c99a0a710ee5d34f3 (patch)
tree7782577a7df3f57eac29b047a8b90e2ce63b14dd /CHANGES
parentfc88507aef921450dd95ada7181f1c316e01ee8b (diff)
downloadredis-py-03260002ded57223c5d05b2c99a0a710ee5d34f3.tar.gz
Optimize sleeping while blocking for a lock
When waiting to acquire a lock, the Lock object will sleep until the lock is acquired or until blocking_timeout has elapsed. This optimization calculates whether the next iteration will occur after blocking_timeout has elapsed and short circuits it immediately. Fixes #1263
Diffstat (limited to 'CHANGES')
-rw-r--r--CHANGES4
1 files changed, 4 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 2ca755d..5cbc7ca 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,10 @@
would be hidden from the user. Thanks @jdufresne. #1281
* Expanded support for connection strings specifying a username connecting
to pre-v6 servers. #1274
+ * Optimized Lock's blocking_timeout and sleep. If the lock cannot be
+ acquired and the sleep value would cause the loop to sleep beyond
+ blocking_timeout, fail immediately. Thanks @clslgrnc. #1263
+
* 3.4.1
* Move the username argument in the Redis and Connection classes to the
end of the argument list. This helps those poor souls that specify all