Commit 3f5284af authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

correcting bug

parent 9bdb985f
...@@ -442,7 +442,7 @@ class pool { ...@@ -442,7 +442,7 @@ class pool {
template<typename F> template<typename F>
void make_task(F&& f, const anonymous& a) { void make_task(F&& f, const anonymous& a) {
auto fp = new std::function<void(void)>(std::forward<F>(f)); auto fp = new std::function<void(void)>(std::forward<F>(f));
return task::create_on_pool(m_pool, forward_work_unit, static_cast<void*>(fp), a); task::create_on_pool(m_pool, forward_work_unit, static_cast<void*>(fp), a);
} }
/** /**
...@@ -463,7 +463,7 @@ class pool { ...@@ -463,7 +463,7 @@ class pool {
template<typename F> template<typename F>
void make_thread(F&& f, const anonymous& a) { void make_thread(F&& f, const anonymous& a) {
auto fp = new std::function<void(void)>(std::forward<F>(f)); auto fp = new std::function<void(void)>(std::forward<F>(f));
return thread::create_on_pool(m_pool, forward_work_unit, static_cast<void*>(fp), a); thread::create_on_pool(m_pool, forward_work_unit, static_cast<void*>(fp), a);
} }
/** /**
...@@ -483,9 +483,9 @@ class pool { ...@@ -483,9 +483,9 @@ class pool {
} }
template<typename F> template<typename F>
managed<thread> make_thread(F&& f, const thread::attribute& attr, const anonymous& a) { void make_thread(F&& f, const thread::attribute& attr, const anonymous& a) {
auto fp = new std::function<void(void)>(std::forward<F>(f)); auto fp = new std::function<void(void)>(std::forward<F>(f));
return thread::create_on_pool(m_pool, forward_work_unit, static_cast<void*>(fp), attr, a); thread::create_on_pool(m_pool, forward_work_unit, static_cast<void*>(fp), attr, a);
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment