|
trafilo 0.1.0
Streaming event-handler framework in C
|
#include "../include/trafilo.h"#include "headers/bounded_queue.h"#include <time.h>#include "headers/dispatcher.h"Functions | |
| static void * | dispatcher_loop (void *arg) |
| dispatcher_t * | dispatcher_create (bounded_queue_t *bounded_q, hashmap_t *hashmap, const trafilo_config_t *trafilo_config) |
| Create a dispatcher instance. | |
| int | dispatcher_start (dispatcher_t *dispatcher) |
| Start a dispatcher thread pool. | |
| void | dispatcher_stop (dispatcher_t *dispatcher) |
| Stop a running dispatcher. Wakes all listeners and producers, shutdowns working queue, and drains fields, merge all dispatcher threads. Sets started flag to 0. | |
| void | dispatcher_destroy (dispatcher_t *dispatcher) |
| Free the dispatcher and free memory. | |
| dispatcher_t * dispatcher_create | ( | bounded_queue_t * | bounded_q, |
| hashmap_t * | hashmap, | ||
| const trafilo_config_t * | trafilo_config ) |
Create a dispatcher instance.
| bounded_q | The working queue. |
| hashmap | The event map. |
| trafilo_config | The user set config, includes the user set callback functions and the desired number of workers. |
| void dispatcher_destroy | ( | dispatcher_t * | dispatcher | ) |
Free the dispatcher and free memory.
| dispatcher | The dispatcher to be destroyed. |
|
static |
| int dispatcher_start | ( | dispatcher_t * | dispatcher | ) |
Start a dispatcher thread pool.
| dispatcher | The dispatcher to be started. |
| void dispatcher_stop | ( | dispatcher_t * | dispatcher | ) |
Stop a running dispatcher. Wakes all listeners and producers, shutdowns working queue, and drains fields, merge all dispatcher threads. Sets started flag to 0.
| dispatcher | The dispatcher to be stopped. |