Example #1
0
void pdispatcher(
    ProcessBase* process,
    std::tr1::shared_ptr<std::tr1::function<Future<R>(T*)> > thunk,
    std::tr1::shared_ptr<Promise<R> > promise)
{
  assert(process != NULL);
  T* t = dynamic_cast<T*>(process);
  assert(t != NULL);
  promise->associate((*thunk)(t));
}