Commit Graph

8 Commits

Author SHA1 Message Date
Joris Vink d8508f4a7b Add the actual task changes for last commit. 2015-07-01 11:03:54 +02:00
Joris Vink 1d604643b5 Add task_threads configuration option.
Before Kore would spawn a task thread per task started
if none were available. This was an obvious bad idiom
but never really hit me hard until now.

Kore will now only spawn as many task threads as configured
by "task_threads" and queue up any newly started tasks ontop
of already running threads if the limit was hit.
2015-06-04 10:29:22 +02:00
Geenz 5af3411513 Code style cleanup in C++ example. 2015-04-01 09:35:05 -04:00
Geenz 3a904cdde3 Add __cplusplus macros to headers. 2015-04-01 07:25:10 -04:00
Joris Vink 8565b47800 Attach tasks/pgsqls to http_requests once more.
This way if an http request is removed while tasks or
pgsqls are still active they are free'd out and cancelled
properly.
2014-08-14 22:05:34 +02:00
Joris Vink c3ea0e9e66 Include pthread.h in tasks.h, fixes compilation under OpenBSD 2014-07-18 15:51:13 +02:00
Joris Vink 7b6c03ca5b Task improvements.
Synchronize access to state/result properly so one
can access these from inside the task as well.

Introduce KORE_TASK_STATE_ABORT which will be set
when a task needs to be abort. You can use this
to create tasks that run in a loop until aborted.
2014-07-04 11:28:17 +02:00
Joris Vink 2c6b5e6b0f Normalize kore_*.h headers 2014-07-03 22:14:46 +02:00