A Rust‐style pollable adaptor over an AsyncGenerator stream.

Synopsis

Declared in <folly/coro/RustAdaptors.h>

template<typename T>
class PollStream;

Type Aliases

Name

Description

Poll

The poll result type: outer optional means ready, inner means end‐of‐stream.

Waker

Callback invoked to wake the poller when progress can be made.

Member Functions

Name

Description

PollStream [constructor]

Constructs a pollable stream that drives the given async generator.

poll

Polls the stream for the next element, registering a waker if pending.

Created with MrDocs