updated API

This commit is contained in:
Johan 2015-01-17 19:42:32 +00:00
parent 719651fd58
commit 14d0ee9e76

View File

@ -29,17 +29,17 @@ void task2(){
int main(){
puts("Making threadpool with 4 threads");
thpool threadpool = thpool_init(4);
threadpool thpool = thpool_init(4);
puts("Adding 40 tasks to threadpool");
int i;
for (i=0; i<20; i++){
thpool_add_work(threadpool, (void*)task1, NULL);
thpool_add_work(threadpool, (void*)task2, NULL);
thpool_add_work(thpool, (void*)task1, NULL);
thpool_add_work(thpool, (void*)task2, NULL);
};
puts("Killing threadpool");
thpool_destroy(threadpool);
thpool_destroy(thpool);
return 0;
}