fix: Assertion in egui_extras::FileLoader::load
This pull request modifies the BytesLoader implementation for FileLoader in crates/egui_extras/src/loaders/file_loader.rs to improve thread safety and handle unexpected states more gracefully.
Changes to thread safety and state handling:
-
Updated the cache logic to check if the
uriexists in the cache before inserting the result. If theuriis not found, a log message is added to indicate the loading was canceled. This change prevents overwriting cache entries unexpectedly. -
[x] I have followed the instructions in the PR template
Preview available at https://egui-pr-preview.github.io/pr/6995-patch6755 Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.
@emilk done Sorry completely forgot about this
@emilk there seems to be no Occupied Poll only has Ready and Pending
okay late night coding is bad haha oops
Thanks!