Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A simple problem about enqueue() #101

Open
jinyunshaobing opened this issue Sep 7, 2022 · 1 comment
Open

A simple problem about enqueue() #101

jinyunshaobing opened this issue Sep 7, 2022 · 1 comment

Comments

@jinyunshaobing
Copy link

How can i do this?

class A
{
public:
    void a(){
        ThreadPool pool(4);
        pool.enqueue(b);
    }
private:
    void b(){
        num++;
    }
    int num;
}

What i see is :No instance of function template 'ThreadPool::enqueue' matching argument list.

@jinyunshaobing jinyunshaobing changed the title A simple problem A simple problem about enqueue() Sep 7, 2022
@ketop
Copy link

ketop commented Dec 3, 2022

pool.enqueue(&A::b, this);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants