## 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
38 lines
979 B
TOML
38 lines
979 B
TOML
[package]
|
|
name = "language_model_core"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/language_model_core.rs"
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
cloud_llm_client.workspace = true
|
|
collections.workspace = true
|
|
futures.workspace = true
|
|
gpui_shared_string.workspace = true
|
|
http_client.workspace = true
|
|
log.workspace = true
|
|
partial-json-fixer.workspace = true
|
|
schemars.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
strum.workspace = true
|
|
thiserror.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
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions.workspace = true
|