ref(scheduler): Make InnerSchedulerState an enum (#4251)

This is more verbose, but makes reasoning about things easier.
This commit is contained in:
Floris Bruynooghe
2023-04-03 11:13:44 +02:00
committed by GitHub
parent 40b072711e
commit c6c20d8f3c
4 changed files with 109 additions and 47 deletions

View File

@@ -91,7 +91,7 @@ pub async fn imex(
let cancel = context.alloc_ongoing().await?;
let res = {
let _guard = context.scheduler.pause(context.clone()).await;
let _guard = context.scheduler.pause(context.clone()).await?;
imex_inner(context, what, path, passphrase)
.race(async {
cancel.recv().await.ok();