| 67 | */ |
| 68 | template<typename Functor> |
| 69 | auto async( Functor&& f, const char* desc FC_TASK_NAME_DEFAULT_ARG, priority prio = priority()) -> fc::future<decltype(f())> { |
| 70 | typedef decltype(f()) Result; |
| 71 | typedef typename fc::deduce<Functor>::type FunctorType; |
| 72 | fc::task<Result,sizeof(FunctorType)>* tsk = |
| 73 | new fc::task<Result,sizeof(FunctorType)>( fc::forward<Functor>(f), desc ); |
| 74 | fc::future<Result> r(fc::shared_ptr< fc::promise<Result> >(tsk,true) ); |
| 75 | async_task(tsk,prio); |
| 76 | return r; |
| 77 | } |
| 78 | void poke(); |
| 79 | |
| 80 |
no test coverage detected