mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-fiber: add Fiber.yield description; close #3066
Fiber.yield cannot be called from #initialize which is called by mrb_funcall(). It is mruby limitation.
This commit is contained in:
@@ -332,7 +332,9 @@ mrb_fiber_yield(mrb_state *mrb, mrb_int len, const mrb_value *a)
|
||||
* along any arguments that were passed to it. The fiber will resume
|
||||
* processing at this point when <code>resume</code> is called next.
|
||||
* Any arguments passed to the next <code>resume</code> will be the
|
||||
* value that this <code>Fiber.yield</code> expression evaluates to.
|
||||
*
|
||||
* mruby limitation: Fiber resume/yield cannot cross C function boundary.
|
||||
* thus you cannot yield from #initialize which is called by mrb_funcall().
|
||||
*/
|
||||
static mrb_value
|
||||
fiber_yield(mrb_state *mrb, mrb_value self)
|
||||
|
||||
Reference in New Issue
Block a user