AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend): use threading.local() for per-thread Redis mutex
Replace event-loop detection in locks() with threading.local() storage. The previous approach had a TOCTOU race: two threads could interleave the check-and-set of _locks/_locks_loop, causing one thread to use a mutex created on another thread's event loop. threading.local() gives each thread its own mutex naturally — no races, no shared mutable state, no stale-loop checks needed.
Z
Zamil Majdy committed
1dcd77e18f2ff5dc041e70c5ea5190d45c21580d
Parent: 8c4b90f