mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +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:
@@ -2466,9 +2466,9 @@ sth_for_the = "future""#
|
||||
include_bytes!("../test-data/webxdc/minimal.xdc"),
|
||||
)
|
||||
.await?;
|
||||
assert!(alice.debug_logging.read().await.is_none());
|
||||
assert!(alice.debug_logging.read().unwrap().is_none());
|
||||
send_msg(&alice, chat_id, &mut instance).await?;
|
||||
assert!(alice.debug_logging.read().await.is_some());
|
||||
assert!(alice.debug_logging.read().unwrap().is_some());
|
||||
|
||||
alice.emit_event(EventType::Info("hi".to_string()));
|
||||
alice
|
||||
|
||||
Reference in New Issue
Block a user