Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::runtime::AsyncStreamOptions Struct Reference

#include <async_stream.hpp>

Public Attributes

std::size_t read_chunk = 4096
 Read chunk size (bytes) used by the background worker.
std::size_t write_high_water = 1 << 20
 High-water mark for pending write bytes.
bool auto_read = true
 When true, the worker reads from the stream eagerly and fires on_data callbacks.
AsyncExecutor executor
 Optional executor used to dispatch completion/data/error callbacks onto the caller's thread.

Member Data Documentation

◆ auto_read

bool pulp::runtime::AsyncStreamOptions::auto_read = true

When true, the worker reads from the stream eagerly and fires on_data callbacks.

Set to false for write-only streams.

◆ executor

AsyncExecutor pulp::runtime::AsyncStreamOptions::executor

Optional executor used to dispatch completion/data/error callbacks onto the caller's thread.

When empty, callbacks run on the AsyncStream's worker thread. Typically wired to a pulp::events::EventLoop via [loop](auto fn){loop->dispatch(std::move(fn));}.

◆ read_chunk

std::size_t pulp::runtime::AsyncStreamOptions::read_chunk = 4096

Read chunk size (bytes) used by the background worker.

◆ write_high_water

std::size_t pulp::runtime::AsyncStreamOptions::write_high_water = 1 << 20

High-water mark for pending write bytes.

write_async returns false when adding the new payload would push the total beyond this limit — callers should wait for the on_drain callback before retrying.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/runtime/include/pulp/runtime/async_stream.hpp