[loop-generated] [optimization] _get_loop_agent singleton is not thread-safe #446

Closed
opened 2026-03-19 18:11:15 +00:00 by Timmy · 0 comments
Owner

What

_get_loop_agent() uses a global without locking. Race condition if two loops start concurrently.

Fix

Use threading.Lock or functools.lru_cache.

Files

  • src/timmy/agentic_loop.py (lines 61-75)
  • tests/timmy/test_agentic_loop.py
## What `_get_loop_agent()` uses a global without locking. Race condition if two loops start concurrently. ## Fix Use `threading.Lock` or `functools.lru_cache`. ## Files - `src/timmy/agentic_loop.py` (lines 61-75) - `tests/timmy/test_agentic_loop.py`
Timmy closed this issue 2026-03-19 18:18:28 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#446