blob: f89a124c4b8a5418769961693894c87f5849d226 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "arena.h"
#include "ll.h"
#include "encryption.h"
#include "scanner.h"
#include "shared.h"
#include "threadpool.h"
#include <errno.h>
#include <error.h>
#include <stdio.h>
int testcb(void *data) {
if(!data)
return -1;
printf("%s\n", (char*)data);
return 0;
}
int main() {
// error(1, ENOTSUP, "No main file lol");
threadpool *tp = threadpool_init(2);
task *tsk = task_init(testcb, "This is some data");
threadpool_addtask(tp, tsk);
threadpool_free(tp);
return 0;
}
|