- Use atomic.Bool for closed flag to prevent TOCTOU race between CallTool and Close operations - Add double-check pattern in CallTool for thread-safe closed state - Use atomic Swap in Close to ensure no new calls can start after closed flag is set - Move MCP manager cleanup defer before initialization to handle partial initialization failures - Update tests to use atomic.Bool operations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| context.go | ||
| context_cache_test.go | ||
| context_test.go | ||
| instance.go | ||
| instance_test.go | ||
| loop.go | ||
| loop_test.go | ||
| memory.go | ||
| mock_provider_test.go | ||
| registry.go | ||
| registry_test.go | ||