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 asset loader preregistration for multiple assets #9453

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Aug 15, 2023

Objective

fix #9452

when multiple assets are queued to a preregistered loader, only one gets unblocked when the real loader is registered.

Solution

i thought async_channel receivers worked like broadcast channels, but in fact the notification is only received by a single receiver, so only a single waiting asset is unblocked. close the sender instead so that all blocked receivers are unblocked.

@github-actions
Copy link
Contributor

Example alien_cake_addict failed to run, please try running it locally and check the result.

@robtfm robtfm added C-Bug An unexpected or incorrect behavior A-Assets Load files from disk to use for things like images, models, and sounds labels Aug 15, 2023
Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

@cart cart added this to the 0.11.2 milestone Aug 16, 2023
@cart cart added this pull request to the merge queue Aug 17, 2023
Merged via the queue into bevyengine:main with commit 8a8d43d Aug 17, 2023
cart pushed a commit that referenced this pull request Aug 17, 2023
# Objective

fix #9452

when multiple assets are queued to a preregistered loader, only one gets
unblocked when the real loader is registered.

## Solution

i thought async_channel receivers worked like broadcast channels, but in
fact the notification is only received by a single receiver, so only a
single waiting asset is unblocked. close the sender instead so that all
blocked receivers are unblocked.
@robtfm robtfm mentioned this pull request Sep 5, 2023
26 tasks
@cart cart mentioned this pull request Oct 13, 2023
43 tasks
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.

Asset loading issue after 0.11.1
3 participants