
Hi, are lazy futures a kind of function pointer? How is the example from the documentation int calculate_the_answer_to_life_the_universe_and_everything(){ return 42; } void invoke_lazy_task(jss::packaged_task<int>& task){ try { task(); } catch(jss::task_already_started&) {} } int main() { jss::packaged_task<int> task(calculate_the_answer_to_life_the_universe_and_everything); task.set_wait_callback(invoke_lazy_task); jss::unique_future<int> f(task.get_future()); assert(f.get()==42); } differ from int main(){ function<int()> task(calculate_the_answer_to_life_the_universe_and_everything); assert(task()==42); } What I'm missing? Could you show other use cases for the set_wait_callback function? Thanks, Vicente _____________________ Vicente Juan Botet Escribá