Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
AsyncResultTest Class Reference
Inheritance diagram for AsyncResultTest:
Inheritance graph
Collaboration diagram for AsyncResultTest:
Collaboration graph

Protected Member Functions

template<typename T >
async_result< T > make_ready (T value)
 
template<typename T >
async_result< T > make_failing ()
 

Detailed Description

Definition at line 38 of file test_async_operations.cpp.

Member Function Documentation

◆ make_failing()

template<typename T >
async_result< T > AsyncResultTest::make_failing ( )
inlineprotected

Definition at line 50 of file test_async_operations.cpp.

50 {
51 std::promise<T> p;
52 p.set_exception(
53 std::make_exception_ptr(std::runtime_error("test_error")));
54 return async_result<T>(p.get_future());
55 }
Template class for asynchronous operation results.

◆ make_ready()

template<typename T >
async_result< T > AsyncResultTest::make_ready ( T value)
inlineprotected

Definition at line 42 of file test_async_operations.cpp.

42 {
43 std::promise<T> p;
44 p.set_value(std::move(value));
45 return async_result<T>(p.get_future());
46 }

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