
Hi Chard, Am Dienstag 30 Juni 2009 22:13:53 schrieb Chard:
Task version 0.1 => 0.2.1 comment. e.g. 0.1:
task::async(threadpool, task::make_task(TaskFunc));
0.2.1 (argument order exchanged in 0.2.1):
task::async(move(task::task<void>(TaskFunc)), threadpool);
I assume the reasoning behind this was the cut-over to using move semantics; if this is the case then the constructor:
Yes - one reason was the introduction of move semantics as well as to provide a default execution-policy for async().
explicit task( Fn fn, BOOST_ENUM_TASK_MAKE_TASK_FUNC_ARGS(n)) \
: task_( new detail::task_wrapper< \
typename result_of< Fn( BOOST_PP_ENUM_PARAMS(n, A)) >::type, \ function< typename result_of< Fn( BOOST_PP_ENUM_PARAMS(n, A)) >::type()
\
( bind( fn, BOOST_PP_ENUM_PARAMS(n, a)) ) ) \
{}
may as well not use result_of; is this not just the template argument, R ?
Hmm - copy-and-past mistake - will be correct it in 0.2.2.
Could make_task have been preserved, but modified to return the move-type ?
ok - I've added make_task for 0.2.2 best regards, Oliver