pseudocode:
src: async_stream<T>;
dst: async_sink<T>;
tokio::spawn( ??? )
where in ??? we want to consume src
, dst
, and have a task whose sole purpose in life is to copy items from src
to dst
Thanks!
pseudocode:
src: async_stream<T>;
dst: async_sink<T>;
tokio::spawn( ??? )
where in ??? we want to consume src
, dst
, and have a task whose sole purpose in life is to copy items from src
to dst
Thanks!
StreamExt::forward
maybe?
That would be
tokio::spawn(channel.forward(sink));
The above is taken verbatim from one of my slides in my talk on actors.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.