促进.多线程

gem*_*xas 2 c++ multithreading boost

class accel{
public:
    accel(int threads, string params);

private:
    void getfile(int from, int to);
    void download(int threads);
};


void accel::download(int threads){
    boost::thread g(&getfile(0, 1));  //<<<<
}
Run Code Online (Sandbox Code Playgroud)

给出错误'&'需要l值.我一直在这样做.如何使它工作?

Moo*_*ice 6

boost::thread g (boost::bind(&accel::getfile, this, 0, 1));
Run Code Online (Sandbox Code Playgroud)