lzpong / threadpool

based on C++11 , a mini threadpool , accept variable number of parameters 基于C++11的线程池,简洁且可以带任意多的参数

Home Page:http://www.cnblogs.com/lzpong/p/6397997.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

发现一个BUG

janqx opened this issue · comments

commented

如果commit函数是static的,则无法执行,请问这是为什么呢?

代码:
`
static void test(int a, int b) {
printf("a = %d, b = %d\n", a, b);
}

int main() {
std::threadpool executor;
executor.commit(test, 10, 20);
return 0;
}

`