Closed mrjoe7 closed 5 years ago
Nice spot! Did you want to try to fork, change to futures::lock::Mutex
yourself and create a PR?
I might try to update the code when I have some free time.
I spent some time looking into the code and did not find any .await
boundary crossing mutex locks.
Now I believe there are no deadlocks possible in the current code.
I was looking into mailbox code and nocited that
std::sync::Mutex
is used inrun_mailbox
which is called fromasync
block atkernel.rs:73
.std::sync::Mutex
should not be used in an asynchronous environment, because a mutex acquisition can block an entire reactor. Instead afutures::lock::Mutex
should be used there to make sure the code won't block an executor.