mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 10:26:29 +03:00
Use sync RwLock for debug_logging
This avoids the need for potentially expensive block_in_place(), but is unlikely to actually block the thread as holding write lock is rare.
This commit is contained in:
@@ -1425,7 +1425,7 @@ pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()> {
|
||||
let logging_xdc_id = context
|
||||
.debug_logging
|
||||
.read()
|
||||
.await
|
||||
.expect("RwLock is poisoned")
|
||||
.as_ref()
|
||||
.map(|dl| dl.msg_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user