Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix concurrency issue when registering assets in AssetPipeline #141

Merged

Conversation

lahma
Copy link
Contributor

@lahma lahma commented Oct 26, 2020

fixes #66

Because HTTP server can accept multiple requests at the same time we can end up iterating assets concurrently and causing System.InvalidOperationException: Collection was modified; enumeration operation may not execute. and it's probably also possible to create invalid state (duplicates).

Switching to ConcurrentDictionary which protects from concurrent writes and also adds indexer to get route directly.

@madskristensen
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants