You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add thread safety to agentglobalconfiguration for concurrent access
Added lock-based synchronization to protect the shared _apiKeys dictionary
from concurrent access issues.
Changes:
- Added private static lock object for synchronization
- Protected SetApiKey method with lock to prevent race conditions
- Changed ApiKeys property to return a snapshot copy under lock instead of exposing mutable dictionary
This prevents race conditions when multiple threads configure or read API keys
concurrently, which could occur in multi-threaded applications or during parallel
model building operations.
Fixes PR #423 comment #1.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments