Skip to content

Commit

Permalink
use recursive lock to allow sending another task while processing the…
Browse files Browse the repository at this point in the history
… task in worker
  • Loading branch information
cenkalti committed Dec 6, 2023
1 parent 1f3ed77 commit f825b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kuyruk/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self,
self._tcp_user_timeout = tcp_user_timeout

self._connection: amqp.Connection = None
self._lock = threading.Lock()
self._lock = threading.RLock()
self._heartbeat_thread: Optional[threading.Thread] = None
self._stop_heartbeat = threading.Event()
self._last_used_at: float = 0 # Time of last connection used at in monotonic time
Expand Down

0 comments on commit f825b6f

Please sign in to comment.