
AMDG On 12/09/2013 12:09 AM, David Goodenough wrote:
namespace Thread { void ThreadRun(boost::function
const &job); void ThreadDelayedRun(boost::function const &job, unsigned int delay); }; <snip>
int myFunc1(int a, int b) { ... return x } <snip> My only concern is the second case where I have myFunc1() whose return type is int, yet in the prototype for ThreadDelayedRun() I'm making it look a whole lot like it's void.
That isn't a problem at all. boost::function
The return type ultimately doesn't matter since this is specifically designed to be a "fire and forget" system, which means that any return value will be lost, there's no way for the invoking thread to recover it.
In Christ, Steven Watanabe