From 7df3d08d8dd0d81f24f0788b44efd37883d3c1c8 Mon Sep 17 00:00:00 2001 From: nodist Date: Sat, 6 Jun 2026 15:42:50 -0400 Subject: start io and remove print op --- docs/application/thread.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'docs/application/thread.md') diff --git a/docs/application/thread.md b/docs/application/thread.md index 4ee5688..56d8566 100644 --- a/docs/application/thread.md +++ b/docs/application/thread.md @@ -9,18 +9,14 @@ typedef struct _kpl_task kpl_task; typedef void kpl_task_fn(kpl_task *t); -#ifndef KPL_TASK_STATE_SIZE -#define KPL_TASK_STATE_SIZE 20 -#endif - typedef struct _kpl_task { POOL_HEADER(kpl_task); _Atomic bool join_ready; uint16_t worker_id; kpl_task_fn *fn; + kpl_tuple *state; kpl_interface *ret_interface; kpl_result ret; - kpl_class state[KPL_TASK_STATE_SIZE]; } kpl_task; typedef struct { @@ -43,6 +39,16 @@ pthread_cond_t async_cond; kpl_thread threads[KPL_MAX_THREADS]; ``` +## Task State + +```text +0 -> length +native : arguments +process : arguments, locals +closure : arguments, locals, closure function +iterator : arguments, locals, iterator functions, iterator function index +``` + ## Per Process Task Queue ## Asynchronous Task Queue -- cgit v1.2.3