WPILibC++ 2024.3.2
|
Explicit specialization for PromiseFactory<void>. More...
#include <wpi/future.h>
Public Types | |
using | ThenFunction = std::function< void(uint64_t)> |
Public Member Functions | |
future< void > | CreateFuture (uint64_t request) |
Creates a future. More... | |
future< void > | MakeReadyFuture () |
Creates a future and makes it immediately ready. More... | |
promise< void > | CreatePromise (uint64_t request) |
Creates a promise. More... | |
void | SetValue (uint64_t request) |
Sets a value directly for a future without creating a promise object. More... | |
void | SetThen (uint64_t request, uint64_t outRequest, ThenFunction func) |
bool | IsReady (uint64_t request) noexcept |
void | GetResult (uint64_t request) |
void | WaitResult (uint64_t request) |
template<class Clock , class Duration > | |
bool | WaitResultUntil (uint64_t request, const std::chrono::time_point< Clock, Duration > &timeout_time) |
Public Member Functions inherited from wpi::detail::PromiseFactoryBase | |
~PromiseFactoryBase () | |
bool | IsActive () const |
wpi::mutex & | GetResultMutex () |
void | Notify () |
void | Wait (std::unique_lock< wpi::mutex > &lock) |
template<class Clock , class Duration > | |
bool | WaitUntil (std::unique_lock< wpi::mutex > &lock, const std::chrono::time_point< Clock, Duration > &timeout_time) |
void | IgnoreResult (uint64_t request) |
uint64_t | CreateRequest () |
bool | EraseRequest (uint64_t request) |
uint64_t | CreateErasedRequest () |
Static Public Member Functions | |
static PromiseFactory & | GetInstance () |
Friends | |
class | future< void > |
Explicit specialization for PromiseFactory<void>.
using wpi::PromiseFactory< void >::ThenFunction = std::function<void(uint64_t)> |
|
inline |
Creates a future.
request | the request id returned by CreateRequest() |
|
inline |
|
static |
void wpi::PromiseFactory< void >::GetResult | ( | uint64_t | request | ) |
|
noexcept |
future< void > wpi::PromiseFactory< void >::MakeReadyFuture | ( | ) |
Creates a future and makes it immediately ready.
void wpi::PromiseFactory< void >::SetThen | ( | uint64_t | request, |
uint64_t | outRequest, | ||
ThenFunction | func | ||
) |
void wpi::PromiseFactory< void >::SetValue | ( | uint64_t | request | ) |
Sets a value directly for a future without creating a promise object.
Identical to promise(factory, request).set_value()
.
request | request id, as returned by CreateRequest() |
void wpi::PromiseFactory< void >::WaitResult | ( | uint64_t | request | ) |
bool wpi::PromiseFactory< void >::WaitResultUntil | ( | uint64_t | request, |
const std::chrono::time_point< Clock, Duration > & | timeout_time | ||
) |
|
friend |