removed yield and added small async sleep in async loop (#1176)
* removed yield and added small async sleep in async loop * fixed linter error
This commit is contained in:
1 parent
35864b4de7
commit
55af1120bf
1 file changed
+1
-2
+1
-2
@@ -33,7 +33,6 @@ use rest::init::start_api_thread;
|
||||
use serialport::UsbPortInfo;
|
||||
use smol::{
|
||||
channel::{Receiver, Sender},
|
||||
future,
|
||||
lock::RwLock,
|
||||
};
|
||||
use socketioxide::extract::SocketRef;
|
||||
@@ -413,7 +412,7 @@ fn main() {
|
||||
app_state.clone(),
|
||||
));
|
||||
}
|
||||
future::yield_now().await;
|
||||
smol::Timer::after(Duration::from_micros(150)).await;
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user