From: "jakit (Jakit Liang)" Date: 2022-01-13T09:57:26+00:00 Subject: [ruby-core:107097] [Ruby master Bug#18484] Fiber should return it self when blocked by IO Issue #18484 has been reported by jakit (Jakit Liang). ---------------------------------------- Bug #18484: Fiber should return it self when blocked by IO https://bugs.ruby-lang.org/issues/18484 * Author: jakit (Jakit Liang) * Status: Open * Priority: Normal * 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: