Skip to content

Fix concurrent maps#2177

Merged
1 commit merged intodocker:mainfrom
dgageot:fix-concurrent-map
Mar 19, 2026
Merged

Fix concurrent maps#2177
1 commit merged intodocker:mainfrom
dgageot:fix-concurrent-map

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 19, 2026

No description provided.

Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot dgageot requested a review from a team as a code owner March 19, 2026 16:55
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

This PR correctly fixes a concurrent map access issue. The removal of r.registerDefaultTools() from within RunStream prevents race conditions when multiple goroutines call RunStream concurrently. The tool registration now happens only once in the constructor (NewLocalRuntime), which is the proper place for initialization.

No bugs found in the changed code.

@dgageot dgageot closed this pull request by merging all changes into docker:main in 137963a Mar 19, 2026
dgageot added a commit to dgageot/cagent that referenced this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants