Project

General

Profile

Bug #17331

Updated by nevans (Nicholas Evans) over 3 years ago

This seems like a feature that would be just as useful for transferring fibers as it is for yielding fibers. 

 I'm using a kwarg, so this is not automatic; the caller must know how to handle the fiber.    If you call a yielding fiber with `transfer: true` or a transferring fiber without `transfer: true`, a `FiberError` will be raised. 

 ```ruby 
 yielding_fiber.raise "message" 
 transferring_fiber.raise "message", transfer: true 
 ``` 

 Implementation: https://github.com/ruby/ruby/pull/3783 
 Alternate implicit implementation: https://github.com/ruby/ruby/pull/3795

Back