tokio1, windows not test yet

This commit is contained in:
rustdesk
2021-06-25 19:42:51 +08:00
parent 25a83f6b4a
commit dc3fcda2c9
23 changed files with 169 additions and 154 deletions

View File

@@ -34,7 +34,7 @@ pub fn new() -> GenericService {
#[cfg(target_os = "linux")]
mod pa_impl {
use super::*;
#[tokio::main(basic_scheduler)]
#[tokio::main(flavor = "current_thread")]
pub async fn run(sp: GenericService) -> ResultType<()> {
if let Ok(mut stream) = crate::ipc::connect(1000, "_pa").await {
let mut encoder =

View File

@@ -5,11 +5,10 @@ use crate::ipc;
use hbb_common::{
config::Config,
fs,
futures::SinkExt,
futures::{SinkExt, StreamExt},
sleep, timeout,
tokio::{
net::TcpStream,
stream::StreamExt,
sync::mpsc,
time::{self, Duration, Instant, Interval},
},

View File

@@ -518,7 +518,7 @@ fn handle_key_(evt: &KeyEvent) {
}
}
#[tokio::main(basic_scheduler)]
#[tokio::main(flavor = "current_thread")]
async fn send_sas() -> ResultType<()> {
let mut stream = crate::ipc::connect(1000, crate::POSTFIX_SERVICE).await?;
timeout(1000, stream.send(&crate::ipc::Data::SAS)).await??;