Pipes reads on SC::AsyncReadableStream to SC::AsyncWritableStream. More...
#include <AsyncStreams.h>
Classes | |
struct | Sink |
User specified source. More... | |
Public Member Functions | |
Result | start () |
User specified sinks. More... | |
Public Attributes | |
Event< MaxListeners, Result > | eventError |
AsyncReadableStream * | source = nullptr |
Emitted when an error occurs. More... | |
Span< Sink > | sinks |
Static Public Attributes | |
static constexpr int | MaxListeners = 8 |
Pipes reads on SC::AsyncReadableStream to SC::AsyncWritableStream.
Back-pressure happens when the source provides data at a faster rate than what the sink (writable) is able to process. When this happens, AsyncPipeline will AsyncReadableStream::pause the (source). It will also AsyncReadableStream::resume it when some writable has finished writing, freeing one buffer. Caller needs to set AsyncPipeline::source field and AsyncPipeline::sinks with valid streams.
Result SC::AsyncPipeline::start | ( | ) |
User specified sinks.
Starts the pipeline
AsyncReadableStream* SC::AsyncPipeline::source = nullptr |
Emitted when an error occurs.