summaryrefslogtreecommitdiff
path: root/internal/task
diff options
context:
space:
mode:
authorClaudomator Agent <agent@claudomator>2026-03-16 19:57:54 +0000
committerClaudomator Agent <agent@claudomator>2026-03-16 19:57:54 +0000
commitc0519a1b117c50a9c3c6394bc2948398ce378a92 (patch)
tree80cf1cc22cf79118378e7c462387098b3d467808 /internal/task
parent20c66b4be2c0b922ae4927d3021c3f2a9e6d1e8c (diff)
fix: clean up activePerAgent before sending to resultCh
Move activePerAgent decrement/deletion out of execute() and executeResume() defers and into the code paths immediately before each resultCh send (handleRunResult and early-return paths). This guarantees that when a result consumer reads from the channel the map is already clean, eliminating a race between defer and result receipt. Remove the polling loop from TestPool_ActivePerAgent_DeletesZeroEntries and check the map state immediately after reading the result instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/task')
0 files changed, 0 insertions, 0 deletions