Don't block on reads with an empty buffer
This commit is contained in:
parent
5389c01ec6
commit
6ffbeae625
@ -27,10 +27,6 @@ impl file_rpc::Server for FileServ {
|
||||
_pos: u64,
|
||||
len: usize,
|
||||
) -> std::result::Result<std::borrow::Cow<'_, [u8]>, ()> {
|
||||
while KEYPRESS_BUF.lock().is_empty() {
|
||||
ipc::process_messages();
|
||||
process_keyboard_data();
|
||||
}
|
||||
let mut encode_buf = [0u8; 4];
|
||||
let mut buf = vec![];
|
||||
let mut remaining_len = len;
|
||||
|
Loading…
Reference in New Issue
Block a user