Split out a foreground and background executor
This commit is contained in:
parent
dd1a2a9e44
commit
11b6d9e33a
26 changed files with 165 additions and 150 deletions
|
@ -185,7 +185,7 @@ pub fn write_and_log<F>(cx: &mut AppContext, db_write: impl FnOnce() -> F + Send
|
|||
where
|
||||
F: Future<Output = anyhow::Result<()>> + Send,
|
||||
{
|
||||
cx.executor()
|
||||
cx.background_executor()
|
||||
.spawn(async move { db_write().await.log_err() })
|
||||
.detach()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue