From: "mame (Yusuke Endoh)" Date: 2022-01-14T04:37:54+00:00 Subject: [ruby-core:107119] [Ruby master Bug#18484] Fiber should return it self when blocked by IO Issue #18484 has been updated by mame (Yusuke Endoh). Assignee set to ioquatix (Samuel Williams) ---------------------------------------- Bug #18484: Fiber should return it self when blocked by IO https://bugs.ruby-lang.org/issues/18484#change-95964 * Author: jakit (Jakit Liang) * Status: Open * Priority: Normal * Assignee: ioquatix (Samuel Williams) * ruby -v: ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Here's an example: ``` f = Fiber.new do sleep(1) Fiber.yield 123 end p f.resume ``` Output: ``` nil ``` Expected output: ``` # ``` ======================== In JavaScipt, an example like: ``` async function testAsync() { return "hello async"; } const result = testAsync(); console.log(result); ``` Output: ``` Promise { 'hello async' } ``` -- https://bugs.ruby-lang.org/ Unsubscribe: