Actions
Bug #18484
closedFiber should return it self when blocked by IO
Description
Here's an example:
f = Fiber.new do
sleep(1)
Fiber.yield 123
end
p f.resume
Output:
nil
Expected output:
#<Fiber:0x000000010e825b18@(irb):59 (paused)>
========================
In JavaScipt, an example like:
async function testAsync() {
return "hello async";
}
const result = testAsync();
console.log(result);
Output:
Promise { 'hello async' }
Updated by mame (Yusuke Endoh) almost 3 years ago
- Assignee set to ioquatix (Samuel Williams)
Updated by ioquatix (Samuel Williams) almost 3 years ago
irb(main):001:1* f = Fiber.new do
irb(main):002:1* sleep(1)
irb(main):003:1* Fiber.yield 123
irb(main):004:0> end
=> #<Fiber:0x000000010d8aa328 (irb):1 (created)>
irb(main):005:0>
irb(main):006:0> p f.resume
123
=> 123
irb(main):007:0>
This appears to work fine to me. Can you please give a more detailed example.
Updated by jeremyevans0 (Jeremy Evans) over 2 years ago
- Status changed from Open to Rejected
Actions
Like0
Like0Like0Like0