Skip to content

mruby-task: return task result when mrb_task_run_once stops a task#6891

Merged
matz merged 1 commit into
mruby:masterfrom
hasumikin:fix/mrb_task_run_once
Jun 14, 2026
Merged

mruby-task: return task result when mrb_task_run_once stops a task#6891
matz merged 1 commit into
mruby:masterfrom
hasumikin:fix/mrb_task_run_once

Conversation

@hasumikin

Copy link
Copy Markdown
Contributor

Return the task result instead of true when the stepped task becomes dormant, so event-loop hosts (PicoRuby.wasm) can observe unhandled task exceptions.

@hasumikin hasumikin requested a review from matz as a code owner June 14, 2026 08:56

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates mrb_task_run_once() to return the task result when the executed task stops and becomes dormant, updating both the implementation and the README documentation. The review feedback suggests simplifying the implementation by removing the redundant local variable result and returning t->result directly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread mrbgems/mruby-task/src/task.c Outdated
Comment thread mrbgems/mruby-task/src/task.c Outdated
Comment thread mrbgems/mruby-task/src/task.c
Return the task result instead of `true` when the stepped task becomes dormant,
so event-loop hosts (PicoRuby.wasm) can observe unhandled task exceptions.
@hasumikin hasumikin force-pushed the fix/mrb_task_run_once branch from b5dbb42 to 427ab7a Compare June 14, 2026 09:00
@matz matz merged commit b02cd63 into mruby:master Jun 14, 2026
18 of 19 checks passed
@hasumikin hasumikin deleted the fix/mrb_task_run_once branch June 14, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants