Hi,Hello all again .
i have couple of questions again which i would appreciate any kind of help and answer,
my first question is about packaged_task and how we can use it ,
i mean i tried using packaged_task with functions , with parameters , and i got errors doing it . so do we always have to use class or stcucts in order for us to use packaged_task ?
template<typename R> class packaged_task { // execution void operator()(); }Waiting for
Have you tried boost::bind?how can i send some arguments to a function when im trying to make a package out of ?
Promise is the on of the basic class of the Boost.Thread/Futures design. In order to have a future you need a promise, a way to provide a value. packaged_task encapsulates a function with a promise and a future. When the functions ends the result is set on the promise so that you could retrieve it using the associated future.
can someone show me a simple sample of using Promise in threading ? i mean i already know about future , whats the need for Promise ? !