File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- Copyright (c) 2012 Jakob Progsch
1+ Copyright (c) 2012 Jakob Progsch, Václav Zeman
22
33This software is provided 'as-is', without any express or implied
44warranty. In no event will the authors be held liable for any damages
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ template<class F, class... Args>
9191auto ThreadPool::enqueue (F&& f, Args&&... args)
9292 -> std::future<typename std::result_of<F(Args...)>::type>
9393{
94- typedef typename std::result_of<F (Args...)>::type return_type ;
94+ using return_type = typename std::result_of<F (Args...)>::type;
9595
9696 auto task = std::make_shared< std::packaged_task<return_type ()> >(
9797 std::bind (std::forward<F>(f), std::forward<Args>(args)...)
@@ -119,7 +119,7 @@ inline ThreadPool::~ThreadPool()
119119 stop = true ;
120120 }
121121 condition.notify_all ();
122- for (std::thread & worker: workers)
122+ for (std::thread &worker: workers)
123123 worker.join ();
124124}
125125
You can’t perform that action at this time.
0 commit comments