#include "thread_pool.h" using namespace std; using namespace sccl; void multiply(const int a, const int b) { const int res = a * b; printf("%d * %d = %d\n", a, b, res); } void* show_id(void* id) { int tid = *(int*)id; for(int i = 0; i < 1000; ++i) { printf("id=%d\n", tid); } return (void*)0; } int main() { ThreadPool thread_pool(30); for(int i = 1; i < 3; ++i) { for(int j = 1; j < 10; ++j) { thread_pool.enqueue(multiply, i, j); } } return 0; }