Files
zed/crates/cloud_api_client/Cargo.toml
T
Lukas Wirth 5849530017 gpui: Replace shared asset futures with owning cache entries (#63934)
## Summary

Replace GPUI's shared asset futures with owning cache entries. The
mutex-backed waiter collection in futures::future::Shared can contend
between a worker and the browser main thread, where blocking waits are
forbidden.

- Keep loading on the background executor, with one foreground task
publishing the cached result and notifying interested views.
- Deduplicate loads and view registrations; cancel pending work on
eviction without allowing completion to update a replacement entry.
- Change App::fetch_asset to return Option<A::Output>, remove
ImageLoadingTask, and make ImageCacheItem an opaque owning entry.
- Migrate the retain-all image cache and image gallery LRU example.
Repository-wide search found no further callers requiring migration.

Results become visible after the foreground completion task publishes
them. Entries expose neither cloneable nor awaitable task handles.

Release Notes:

- N/A
2026-09-09 09:30:38 +00:00

36 lines
929 B
TOML

[package]
name = "cloud_api_client"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "Apache-2.0"
[lints]
workspace = true
[lib]
path = "src/cloud_api_client.rs"
[dependencies]
anyhow.workspace = true
cloud_api_types.workspace = true
futures-lite.workspace = true
futures.workspace = true
gpui.workspace = true
http_client.workspace = true
parking_lot.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
yawc.workspace = true
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
# Workspace inheritance would re-enable defaults, including blocking synchronization.
async-lock = { version = "3.4.2", default-features = false }
[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies]
async-lock.workspace = true
[target.'cfg(not(target_family = "wasm"))'.dependencies]
gpui_tokio.workspace = true