Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Fiber.yield

Fiber.yield(args, ...) → obj

Yields control back to the context that resumed the fiber, passing along any arguments that were passed to it. The fiber will resume processing at this point when resume is called next. Any arguments passed to the next resume will be the value that this Fiber.yield expression evaluates to.

See also .set_scheduler #alive? .scheduler #backtrace also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0