Skip to content

Fix hot reloads of a folder resulting in deadlocks.#23980

Merged
alice-i-cecile merged 3 commits intobevyengine:mainfrom
andriyDev:hot-reload-folder
Apr 26, 2026
Merged

Fix hot reloads of a folder resulting in deadlocks.#23980
alice-i-cecile merged 3 commits intobevyengine:mainfrom
andriyDev:hot-reload-folder

Conversation

@andriyDev
Copy link
Copy Markdown
Contributor

Objective

Solution

  • Don't lock the infos RwLock inside load_folder_internal. Instead at every callsite (2 callsites), count the number of started loads with whatever locks we have.
  • Move the load_folder_internal calls until after we drop the infos.

Testing

  • Added a test for this.

@andriyDev andriyDev added C-Bug An unexpected or incorrect behavior A-Assets Load files from disk to use for things like images, models, and sounds D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 25, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Assets Apr 25, 2026
@kfc35 kfc35 self-requested a review April 25, 2026 21:38
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 26, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 26, 2026
Merged via the queue into bevyengine:main with commit 6090daa Apr 26, 2026
48 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Assets Apr 26, 2026
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 D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

load_folder deadlocks when file watcher detects added/removed files

3 participants