massa
massa copied to clipboard
Deadlock in MockPoolController
wait_command
does a blocking recv_timeout
on a std::sync::mpsc::Receiver
, which blocks the current thread.
In a single threaded async context(the default for the tokio tests), this means it blocks the thread running the tokio tasks, until the timeout is hit.
The quick fix can be seen in one of the last commits of https://github.com/massalabs/massa/pull/2946
The solution would be to rewrite it with an async channel(where the recv
would yield the current task, allowing the other task to actually send the command).
cc @massalabs/core-team
This doesn't exist anymore in newer version. Close it.