feat: mutex to prevent fetching from multiple IMAP servers at the same time

This commit is contained in:
link2xt
2026-02-27 10:41:48 +00:00
committed by l
parent 6a705a3ef6
commit 54858361a9
2 changed files with 10 additions and 0 deletions

View File

@@ -606,6 +606,7 @@ impl Imap {
.await
.context("prefetch")?;
let read_cnt = msgs.len();
let _fetch_msgs_lock_guard = context.fetch_msgs_mutex.lock().await;
let mut uids_fetch: Vec<u32> = Vec::new();
let mut available_post_msgs: Vec<String> = Vec::new();