allow return of value from scheduler start

This commit is contained in:
q66 2017-03-18 20:04:22 +01:00
parent f07eefaf5a
commit 9f6d8da9db

View file

@ -19,8 +19,8 @@ struct thread_scheduler {
} }
template<typename F, typename ...A> template<typename F, typename ...A>
void start(F &&func, A &&...args) { auto start(F &&func, A &&...args) -> std::result_of_t<F(A...)> {
func(std::forward<A>(args)...); return func(std::forward<A>(args)...);
} }
template<typename F, typename ...A> template<typename F, typename ...A>