feat: add threadpool and started pooling executors

This commit is contained in:
2024-08-03 13:08:46 +02:00
parent e35dbdb1f3
commit dcc25f88a7
15 changed files with 544 additions and 85 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef SCI_PIPELINE_H
#define SCI_PIPELINE_H
#include "optional.h"
#include <pthread.h>
#include <sys/inotify.h>
typedef struct {
char* name;
char* url;
char* trigger;
char* command;
} pipeline_conf;
typedef optional_type(pipeline_conf*) optional_pipeline_conf;
typedef struct {
const struct inotify_event* event;
const char* command;
} pipeline_event;
// create a new pipeline_conf struct instance based on a configuration line.
optional_pipeline_conf pipeline_create(const char* config_line);
void pipeline_register(pthread_t thread);
void pipeline_loop();
#endif