summaryrefslogtreecommitdiff
path: root/src/main.c
blob: 6af87abfc2ad4352f604ebb0d59bdcaabc59f103 (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
#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_join(tp);
    threadpool_free(tp);

    return 0;
}