mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 01:16:29 +03:00
feat: Pause IO for BackupProvider (#4182)
This makes the BackupProvider automatically invoke pause-io while it is needed. It needed to make the guard independent from the Context lifetime to make this work. Which is a bit sad.
This commit is contained in:
committed by
GitHub
parent
e04efdbd94
commit
35f50a8965
@@ -91,7 +91,7 @@ pub async fn imex(
|
||||
let cancel = context.alloc_ongoing().await?;
|
||||
|
||||
let res = {
|
||||
let mut guard = context.scheduler.pause(context).await;
|
||||
let mut guard = context.scheduler.pause(context.clone()).await;
|
||||
let res = imex_inner(context, what, path, passphrase)
|
||||
.race(async {
|
||||
cancel.recv().await.ok();
|
||||
|
||||
Reference in New Issue
Block a user