To avoid buffering large amounts of data in the process, we set the
worker channel size to 1. Keep in mind that this is one
ChannelEvent, not one byte. ChannelEvent::Data can already contain
an arbitrary amount of data via its Vec<u8>.
This forces the worker to block as long as no one is reading data on the other side.
We also remove an unused function, and move the flushing to the
ChannelFlushWriter.
To avoid buffering large amounts of data in the process, we set the
worker channel size to 1. Keep in mind that this is one
ChannelEvent, not one byte. ChannelEvent::Data can already contain
an arbitrary amount of data via its Vec<u8>.
This forces the worker to block as long as no one is reading data on the other side.
We also remove an unused function, and move the flushing to the
ChannelFlushWriter.
Update.