mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
move pause to only exist on Scheduler
This commit is contained in:
committed by
link2xt
parent
52fa58a3ce
commit
2c3b2b8c2d
@@ -24,7 +24,7 @@ use crate::key::{DcKey, SignedPublicKey};
|
||||
use crate::login_param::LoginParam;
|
||||
use crate::message::{self, MessageState, MsgId};
|
||||
use crate::quota::QuotaInfo;
|
||||
use crate::scheduler::{IoPausedGuard, SchedulerState};
|
||||
use crate::scheduler::SchedulerState;
|
||||
use crate::sql::Sql;
|
||||
use crate::stock_str::StockStrings;
|
||||
use crate::timesmearing::SmearedTimestamp;
|
||||
@@ -409,16 +409,6 @@ impl Context {
|
||||
self.scheduler.restart(self).await;
|
||||
}
|
||||
|
||||
/// Pauses the IO scheduler.
|
||||
///
|
||||
/// This temporarily pauses the IO scheduler and will make sure calls to
|
||||
/// [`Context::start_io`] are no-ops while being paused.
|
||||
///
|
||||
/// It is recommended to call [`IoPausedGuard::resume`] rather than simply dropping it.
|
||||
pub(crate) async fn pause_io(&self) -> IoPausedGuard<'_> {
|
||||
self.scheduler.pause(self).await
|
||||
}
|
||||
|
||||
/// Indicate that the network likely has come back.
|
||||
pub async fn maybe_network(&self) {
|
||||
self.scheduler.maybe_network().await;
|
||||
|
||||
Reference in New Issue
Block a user