blob: 73169d1fe296103747dac12475c6f140d3bb676c (
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
30
31
32
33
34
35
36
37
|
#include "arena.h"
#include "encryption.h"
#include "ll.h"
#include "scanner.h"
#include "shared.h"
#include "threadpool.h"
#include <errno.h>
#include <error.h>
#include <printf.h>
#include <unistd.h>
int testcb(void *arg) {
if(!arg)
return -1;
printf("%s\n", (char*)arg);
return 0;
}
int main() {
// error(-1, ENOTSUP, "lol");
cqueue *cq = cqueue_init();
// if(!cq)
// abort();
cqueue_registerthreads(cq, 10);
cqueue_addtask(cq, task_init(testcb, "this is some data"));
sleep(3);
cqueue_free(cq);
return 0;
}
|