A Rust‐style pollable adaptor over a Task or SemiFuture.

Synopsis

Declared in <folly/coro/RustAdaptors.h>

template<typename T>
class PollFuture final

Type Aliases

Name

Description

Poll

The poll result type: engaged when the future has a value ready.

Waker

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

Member Functions

Name

Description

PollFuture [constructor]

Constructors

~PollFuture [destructor] [virtual]

Destroys the future, cancelling and draining any pending work first.

operator=

Assignment operators

poll

Polls the future for its result, registering a waker if pending.

Created with MrDocs