It really helps to write to disk in a separate thread!

This commit is contained in:
Igor Katson 2024-05-01 23:01:06 +01:00
parent fa557cedd9
commit 9bcd18e7af
2 changed files with 4 additions and 2 deletions

View file

@ -1502,7 +1502,8 @@ impl PeerHandler {
let _ = tx.send(WriterRequest::Disconnect(Err(e)));
}
};
disk_work_queue_tx.send(Box::new(work))?;
tokio::runtime::Handle::current().spawn_blocking(work);
// disk_work_queue_tx.send(Box::new(work))?;
} else {
self.state
.meta