Should async-byte-channel work with a Tokio LocalSet? #500
-
I can successfully use async-byte-channel with I wanted to try with a multi-threaded Tokio executor, but Should I be able to use async-byte-channel with a Tokio |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Note that I tried using Tokio's |
Beta Was this translation helpful? Give feedback.
-
I expect it to work with any executor. Can you post your code? |
Beta Was this translation helpful? Give feedback.
-
EDIT: I was missing a line, see the next answer 🤦♂️. Sure. I have a simple test interface that implements
I would expect the test to pass, but instead it times out with:
As mentioned above, instead of the
But it fails the exact same way: the client doesn't go further than the line |
Beta Was this translation helpful? Give feedback.
-
Argh I found it, I was not calling Just for my undersatnding: it is intuitive to me that I need to call |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Argh I found it, I was not calling
tokio::task::spawn_local(client_rpc_system);
🤦♂️. Adding it to the client task above makes it work with both async-byte-channel and DuplexStream.Just for my undersatnding: it is intuitive to me that I need to call
tokio::task::spawn_local(server_rpc_system);
(because the server has to be running, obviously), but why is there a need for the same on the client side?