Boost logo

Boost :

Subject: Re: [boost] Futures Review Starts Today - January 5, 2009
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-01-26 17:30:25


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 {
        } catch(jss::task_already_started&) {}

    int main() {
        jss::packaged_task<int> task(calculate_the_answer_to_life_the_universe_and_everything);
        jss::unique_future<int> f(task.get_future());

differ from

    int main(){
        function<int()> task(calculate_the_answer_to_life_the_universe_and_everything);

What I'm missing?

Could you show other use cases for the set_wait_callback function?

Vicente Juan Botet Escribá

Boost list run by bdawes at, gregod at, cpdaniel at, john at