mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
edfaf4af99
add priority queue operations: - q_get_queue: select queue based on task status - q_insert_task: priority-based insertion (lower number = higher priority) - q_delete_task: remove task from queue - q_find_task: search for task in all queues add task lifecycle functions: - task_alloc: allocate and zero-initialize task structure - task_free: free task and associated context (stack + callinfo) - task_init_context: initialize execution context similar to fiber * allocate vm stack with dynamic sizing based on irep->nregs * allocate callinfo stack * setup callinfo with proc and target class * set context status to MRB_TASK_CREATED this completes phase 2 of the task scheduler implementation. Co-authored-by: Claude <noreply@anthropic.com>