MT Core (C++)
Core library for replacing C++ standard in project usage
|
Represents a value that will be made available in the future Can wait on the value for when it is ready. More...
#include <future.hpp>
Public Member Functions | |
Result< Future, ArcError > | acquire (Allocator &alloc) |
Acquires a new reference to the future (if you want multiple parts of your code to read it) | |
T | wait () |
Blocks to wait for result. | |
void | deinit (Allocator &alloc) |
Cleans up future. | |
Public Attributes | |
Arc< FutureState< T, E > > | state |
Represents a value that will be made available in the future Can wait on the value for when it is ready.
Atomic Reference Counting
Condition Variables:
Non-Blocking Availability:
T | Value that will be returned |
E | Extra state in the underlying state |
Definition at line 50 of file future.hpp.
|
inline |
Acquires a new reference to the future (if you want multiple parts of your code to read it)
alloc | Allocator for arc |
Definition at line 57 of file future.hpp.
|
inline |
Cleans up future.
Definition at line 74 of file future.hpp.
|
inlinenodiscard |
Arc<FutureState<T, E> > mtcore::thread::Future< T, E >::state |
Definition at line 51 of file future.hpp.