mirror of
https://github.com/OMGeeky/gdriver2.git
synced 2025-12-26 16:07:58 +01:00
fix deadlock when quickly reading stuff
async calling sync calling async is a fucking pain
This commit is contained in:
@@ -38,8 +38,7 @@ mod send_requests {
|
||||
macro_rules! send_request {
|
||||
($func:expr ) => {{
|
||||
let handle = ::tokio::runtime::Handle::current();
|
||||
let _ = handle.enter();
|
||||
futures::executor::block_on($func)
|
||||
handle.block_on($func)
|
||||
}};
|
||||
}
|
||||
#[macro_export]
|
||||
|
||||
@@ -55,7 +55,10 @@ async fn mount(
|
||||
let _ = end_program_signal_awaiter(sender, session_ender).await;
|
||||
});
|
||||
debug!("Mounting fuse filesystem");
|
||||
let _ = session.run();
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let _ = session.run();
|
||||
})
|
||||
.await?;
|
||||
debug!("Stopped with mounting");
|
||||
// Ok(session_ender)
|
||||
Ok(end_program_signal_handle)
|
||||
|
||||
Reference in New Issue
Block a user