Boost logo

Boost Users :

From: Alexander Dong Back Kim (alexdbkim_at_[hidden])
Date: 2008-03-16 23:45:18


Hi all,

I'm a new user of BOOST library. I'm creating a class that requires to do
some multi threading stuff.
The class I'm creating has a method...

void Calculator::Calc(int value)
{
...
}

In order to run multiple Calc() in different threads, I created another
method FindResult() the implementation was...

void Calculator::FindResult(int numbers)
{
    thread_group group;
    boost::function<void (Calculator *, int value)> boostFunction;
    boostFunction = &Calculator::Calc;

    for(int i=0; i<3; i++)
    {
        boost::thread * th = group.create_thread(&boostFunction);
    }
}

However, it seems it doesn't work at all...
Is there any idea??

Cheers,

-- 
Alexander Dong Back Kim
Australia +61 433 469 100 / Korea +82 10 6357 8840


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net