Add an example tcp_echo_server_non_blocking#32
Add an example tcp_echo_server_non_blocking#32Heap-Hop wants to merge 3 commits intobytecodealliance:mainfrom
tcp_echo_server_non_blocking#32Conversation
|
Thanks for submitting this. We will want to exercise this with a test like we do for the tcp_echo_server. As far as the style, this uses |
Done. It does need a test, but due to bytecodealliance/wasmtime#9667, I haven’t found a good way to write one yet. |
|
|
||
| futures_lite::future::poll_fn(|cx| { | ||
| if let Poll::Ready(_) = listening_task.as_mut().poll(cx) { | ||
| return Poll::Ready(()); |
There was a problem hiding this comment.
I don't think we want to return as Ready until both the Listener is ready and the stream tasks are all complete.
There was a problem hiding this comment.
Sorry, I didn't quite understand what you meant. Could you please tell me your thoughts directly?
|
With #86, this example has been changed to use tasks, and so it no longer has the blocking behavior. |
|
Cool! |
#25