Fix potential deadlock in AssetServer on single-threaded modes.#15808
Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom Oct 11, 2024
Merged
Fix potential deadlock in AssetServer on single-threaded modes.#15808alice-i-cecile merged 1 commit intobevyengine:mainfrom
AssetServer on single-threaded modes.#15808alice-i-cecile merged 1 commit intobevyengine:mainfrom
Conversation
Contributor
Author
|
Note an alternative is to do the dropping of the lock outside the function, but that would mean duplicating it twice. |
aecsocket
approved these changes
Oct 10, 2024
Contributor
aecsocket
left a comment
There was a problem hiding this comment.
I think this change makes sense, I don't entirely like passing the RwLockWriteGuard across functions but that's fine if this logic is more correct.
JMS55
approved these changes
Oct 11, 2024
Contributor
JMS55
left a comment
There was a problem hiding this comment.
Didn't test, but seems fine to me.
Member
|
does this fix also #15508? |
Contributor
Author
Yes, this also seems to fix #15508, at least the reproduction case provided (I tested it on HEAD first to make sure it was still broken). I don't know why @alice-i-cecile reopened the issue though, so maybe there's another cause? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Fixes #15807
Solution
We move the guard into this function.
Testing
N/A, This is just reverting to the old behavior before #15509.