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!
That would be
tokio::spawn(channel.forward(sink));
The above is taken verbatim from one of my slides in my talk on actors.