Fastly Compute C++ SDK
Loading...
Searching...
No Matches
fastly::http::request::PendingRequest Class Reference

#include <request.h>

Friends

std::pair< fastly::expected< Response >, std::vector< PendingRequest > > select (std::vector< PendingRequest > &reqs)

Detailed Description

A handle to a pending asynchronous request returned by Request::send_async() or Request::send_async_streaming().

A handle can be evaluated using PendingRequest::poll(), PendingRequest::wait(), or http::select. It can also be discarded if the request was sent for effects it might have, and the response is unimportant.

◆ select

std::pair< fastly::expected< Response >, std::vector< PendingRequest > > select ( std::vector< PendingRequest > & reqs)
friend

Given a collection of PendingRequests, block until the result of one of the requests is ready.

Returns an std::pair of <result, remaining>, where:

  • result is the result of the request that became ready.
  • remaining is a vector containing all of the requests that did not become ready. The order of the requests in this vector is not guaranteed to match the order of the requests in the argument collection.

Panics

Panics if the argument collection is empty, or contains too many requests.


The documentation for this class was generated from the following file: