[#100689] [Ruby master Feature#17303] Make webrick to bundled gems or remove from stdlib — hsbt@...
Issue #17303 has been reported by hsbt (Hiroshi SHIBATA).
11 messages
2020/11/02
[#100852] [Ruby master Feature#17326] Add Kernel#must! to the standard library — zimmerman.jake@...
SXNzdWUgIzE3MzI2IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGpleiAoSmFrZSBaaW1tZXJtYW4pLg0K
24 messages
2020/11/14
[#100930] [Ruby master Feature#17333] Enumerable#many? — masafumi.o1988@...
Issue #17333 has been reported by okuramasafumi (Masafumi OKURA).
10 messages
2020/11/18
[#101071] [Ruby master Feature#17342] Hash#fetch_set — hunter_spawn@...
Issue #17342 has been reported by MaxLap (Maxime Lapointe).
26 messages
2020/11/25
[ruby-core:101064] [Ruby master Feature#17331] Let Fiber#raise work with transferring fibers
From:
ko1@...
Date:
2020-11-25 01:32:07 UTC
List:
ruby-core #101064
Issue #17331 has been updated by ko1 (Koichi Sasada). I heard from Samuel, it is used to raise an timeout error or something on a fiber scheduler. Because the fiber scheduler manages fibers by transferring and it is needed. ---- I'm not sure what is implicit approach and what is explicit approach. Could you summarize the spec? ---------------------------------------- Feature #17331: Let Fiber#raise work with transferring fibers https://bugs.ruby-lang.org/issues/17331#change-88738 * Author: nevans (Nicholas Evans) * Status: Open * Priority: Normal ---------------------------------------- It would be useful to use `raise` on transferring fibers just as we can with yielding fibers. I've added a `transfer` kwarg, so it 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. Resuming fibers still raise a `FiberError`. ```ruby yielding_fiber.raise "message" # => resumes and raises from the last Fiber.yield transferring_fiber.raise "message", transfer: true # => transfers and raises from the last fiber.transfer resuming_fiber.raise "message" # => raises FiberError ``` Implementation: https://github.com/ruby/ruby/pull/3783 I also implemented a second version that implicitly and automatically selects `rb_fiber_transfer_kw` for transferring fibers and `rb_fiber_resume_kw` for yielding fibers. The implicit version also raises `FiberError` on resuming fibers. ```ruby yielding_fiber.raise "message" # => resumes and raises from the last Fiber.yield transferring_fiber.raise "message" # => transfers and raises from the last fiber.transfer resuming_fiber.raise "message" # => raises FiberError ``` Alternate implicit implementation: https://github.com/ruby/ruby/pull/3795 I slightly prefer the explicit version, but I'm okay with the implicit version. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>