Run desktop startup on blocking pool
Some checks failed
Dependency security audit / rustsec (push) Has been cancelled

This commit is contained in:
Georg Bauer
2026-08-26 11:13:09 +02:00
parent 300ccf5f1f
commit 7d21abd5c1
3 changed files with 9 additions and 3 deletions

1
Cargo.lock generated
View File

@@ -5434,6 +5434,7 @@ dependencies = [
"muda",
"rfd",
"tempfile",
"tokio",
"url",
"zeroize",
]

View File

@@ -30,6 +30,7 @@ path = "src/main.rs"
[dependencies]
iced.workspace = true
ironstorage = { workspace = true, features = ["ssh"] }
tokio.workspace = true
zeroize.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]

View File

@@ -6275,9 +6275,13 @@ fn parse_generation_length(value: &str) -> Result<Option<NonZeroUsize>, String>
async fn load_authentication()
-> Result<(DesktopStorage, NativeAuthenticationSession, KeyInfo), String> {
DesktopStorage::system()
.map(|bootstrap| bootstrap.into_parts())
.map_err(|error| error.to_string())
tokio::task::spawn_blocking(|| {
DesktopStorage::system()
.map(|bootstrap| bootstrap.into_parts())
.map_err(|error| error.to_string())
})
.await
.map_err(|error| format!("desktop startup task failed: {error}"))?
}
fn load_document(