mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
745e577b0e
Implement main task wrapper following Fiber's pattern, where root context is represented by a special task object. This matches PicoRuby behavior where Task.current always returns a task object, even from root context. The main task is lazy-allocated on first Task.current call from root, stored in mrb->task.main_task, and has name "main", status RUNNING, priority 0. It wraps the root context without allocating a separate execution context. Co-authored-by: Claude <noreply@anthropic.com>