allow return of value from scheduler start

master
Daniel Kolesa 2017-03-18 20:04:22 +01:00
parent f07eefaf5a
commit 9f6d8da9db
1 changed files with 2 additions and 2 deletions

View File

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