Try to receive from worker in image::cache::trim

This commit is contained in:
Héctor Ramón Jiménez 2025-10-29 13:39:51 +01:00
parent 951f3a5b2b
commit f0d0d3d114
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -292,10 +292,13 @@ impl Cache {
pub fn trim(&mut self) {
#[cfg(feature = "image")]
self.raster.cache.trim(&mut self.atlas, |_bind_group| {
#[cfg(not(target_arch = "wasm32"))]
self.worker.drop(_bind_group);
});
{
self.receive();
self.raster.cache.trim(&mut self.atlas, |_bind_group| {
#[cfg(not(target_arch = "wasm32"))]
self.worker.drop(_bind_group);
});
}
#[cfg(feature = "svg")]
self.vector.trim(&mut self.atlas); // TODO: Concurrency