Closed SteveLauC closed 5 months ago
Interesting. What happens if you try a simpler example that uses only capnp-futures (and no RPC)? Does that hit a similar problem?
Hi! Thanks for your help and response!
I wrote a simple TCP server that would echo the message received from client using capnp-futures and monoio (repo), and it looks like it is working pretty well:
$ cargo b
$ ./target/debug/capnp_futures_monoio server 127.0.0.1:8100
INFO: server listening on 127.0.0.1:8100
$ ./target/debug/capnp_futures_monoio client 127.0.0.1:8100 first_message
INFO: client message sent
INFO: client received: 'Server: copy that'
$ ./target/debug/capnp_futures_monoio server 127.0.0.1:8100
INFO: server listening on 127.0.0.1:8100
INFO: Server received: 'first_message'
INFO: Server response sent
Well, it turns out that it WORKS on monoio!
It blocks in my repo because I .awaited the RpcSystem
, which should not be done, so this issue does not exist, closing.
Ah, right. The RpcSystem
needs to be driven, but if you await
it in the main task then it will never finish. You need to spawn a new task for it.
Hi:)
I am playing the
hello-world
example on monoio (A runtime that is based on io_uring), but both server and client sides block, and from my observation,.await
ingRpcSystem
won't finish and simply blocks, so I come here to seek some help:>You can find the code here, in README, I documented the changes that I have made to the original code and some observations that I found while debugging the program, hope they will help a bit.