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 deadlock in hot asset reloading (#375) #376

Merged
merged 1 commit into from
Aug 30, 2020
Merged

Conversation

mrk-its
Copy link
Member

@mrk-its mrk-its commented Aug 27, 2020

There is a deadlock in asset_server.filesystem_watcher_system: while asset_server.filesystem_watcher read lock is kept (scope of this lock is too big, whole while block) asset_server.load_untyped is called, trying to take write lock on asset_server.filesystem_watcher. The fix is to reduce scope of read lock, so asset_server.load_untyped is called with released read lock.
It fixes #375

@karroffel karroffel added A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior labels Aug 28, 2020
@AngelOnFira
Copy link
Contributor

@cart could you rerun the CI jobs for this PR? (Artifact of #380)

@cart
Copy link
Member

cart commented Aug 30, 2020

This makes sense to me. Thanks for the fix!

@cart cart merged commit 8101622 into bevyengine:master Aug 30, 2020
mrk-its added a commit to mrk-its/bevy that referenced this pull request Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling hot asset reloading freezes application when asset file is changed.
4 participants