|
AMFuture
201909
String localization library
|
#include <functional>#include <chrono>#include <type_traits>#include <cassert>#include <future>#include <set>
Go to the source code of this file.
Classes | |
| class | AMCore::AMFuture< T > |
| Result of type T of asynchronous call. More... | |
| class | AMCore::AMFuture< T > |
| Result of type T of asynchronous call. More... | |
Typedefs | |
| typedef std::future_status | AMCore::AMFutureStatus |
| Status of future is exacly the same as std::future_status. | |
| typedef std::launch | AMCore::AMLaunch |
| Launch mode is exactly the same as std::launch. | |
Functions | |
| template<class Callback , class AvailCallback , class Function , class TCF , class... Args> | |
| AMFuture< std::invoke_result_t< std::decay_t< Callback >, TCF, void * > > | AMCore::AMAsync (AMLaunch policy, Callback &&callback, AvailCallback &&a, Function &&f, TCF &&tcf, Args &&... args) |
| asynchronous call More... | |
| bool | AMCore::checkZombies () |
| Check for active AMFuture. More... | |
std::async wrapper for both multithreaded and singlethreaded system
| AMFuture< std::invoke_result_t< std::decay_t< Callback >, TCF, void * > > AMCore::AMAsync | ( | AMLaunch | policy, |
| Callback && | callback, | ||
| AvailCallback && | a, | ||
| Function && | f, | ||
| TCF && | tcf, | ||
| Args &&... | args | ||
| ) |
asynchronous call
Launch, possible asynchronous a function.
| Callback | Get data function. Return type is T (From AMFuture<T>) a parameter is your own tag of type void *. It must be member function of type TCF. |
| AvailCallback | Check, if data is available. Tou need not implement this function. It must be member function of type TCF. |
| Function | Prepare data function. It should return unique tag tied with result. Return type is a tag of void *. It must be member function of type TCF. |
| TCF | Caller object type. |
| Args | All parameters of Function. It's absolutly free. |
| policy | valid is AMLaunch::async |
| callback | Callback type function. |
| a | AvailCallback type function. |
| f | Function type function. |
| tcf | Caller object. |
| args | Free paramater that f have. |
|
inline |
Check for active AMFuture.
References AMCore::checkZombies().
Referenced by AMCore::checkZombies().
1.8.17