CHANGE LOCK TO NOT BE DROPPED INSTANTLY. DANG U RUST
co-authored-by: kay@zed.dev
This commit is contained in:
@@ -266,12 +266,10 @@ pub fn background_thread_queue() -> WriteQueueConstructor {
|
||||
|
||||
pub fn locking_queue() -> WriteQueueConstructor {
|
||||
Box::new(|| {
|
||||
let mutex = Mutex::new(());
|
||||
let write_mutex = Mutex::new(());
|
||||
Box::new(move |queued_write| {
|
||||
eprintln!("Write started");
|
||||
let _ = mutex.lock();
|
||||
let _lock = write_mutex.lock();
|
||||
queued_write();
|
||||
eprintln!("Write finished");
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user