* [ruby-core:101529] [Ruby master Misc#17407] Fiber.current and require 'fiber'
@ 2020-12-18 23:08 zverok.offline
2020-12-19 11:22 ` [ruby-core:101537] " eregontp
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zverok.offline @ 2020-12-18 23:08 UTC (permalink / raw)
To: ruby-core
Issue #17407 has been reported by zverok (Victor Shepelev).
----------------------------------------
Misc #17407: Fiber.current and require 'fiber'
https://bugs.ruby-lang.org/issues/17407
* Author: zverok (Victor Shepelev)
* Status: Open
* Priority: Normal
----------------------------------------
Maybe it is not the right time to ask, but why one need to do `require 'fiber'` before using `Fiber.current`?
For what I can see,
* it is this way since [their introduction](https://docs.ruby-lang.org/en/2.0.0/Fiber.html#method-c-current),
* the actual code is defined in the core [cont.c](https://github.com/ruby/ruby/blob/master/cont.c#L2480)
* the `ext/fiber.c` [does very little](https://github.com/ruby/ruby/blob/master/ext/fiber/fiber.c)
I was just bitten by it again preparing the changelog (stuck with `NoMethodError` and for a few minutes thought the build is broken), is there a reason to have it this way?..
Just clarifying for docs sake, at least.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:101537] [Ruby master Misc#17407] Fiber.current and require 'fiber'
2020-12-18 23:08 [ruby-core:101529] [Ruby master Misc#17407] Fiber.current and require 'fiber' zverok.offline
@ 2020-12-19 11:22 ` eregontp
2021-01-04 1:47 ` [ruby-core:101898] [Ruby master Feature#17407] " nobu
2021-01-13 6:52 ` [ruby-core:102053] " ko1
2 siblings, 0 replies; 4+ messages in thread
From: eregontp @ 2020-12-19 11:22 UTC (permalink / raw)
To: ruby-core
Issue #17407 has been updated by Eregon (Benoit Daloze).
Maybe we should just include these Fiber methods in core, and `require 'fiber'` would be a no-op (for compatibility)?
Agreed it's confusing such a core class has only half the documented defined without an extra `require`.
----------------------------------------
Misc #17407: Fiber.current and require 'fiber'
https://bugs.ruby-lang.org/issues/17407#change-89319
* Author: zverok (Victor Shepelev)
* Status: Open
* Priority: Normal
----------------------------------------
Maybe it is not the right time to ask, but why one need to do `require 'fiber'` before using `Fiber.current`?
For what I can see,
* it is this way since [their introduction](https://docs.ruby-lang.org/en/2.0.0/Fiber.html#method-c-current),
* the actual code is defined in the core [cont.c](https://github.com/ruby/ruby/blob/master/cont.c#L2480)
* the `ext/fiber.c` [does very little](https://github.com/ruby/ruby/blob/master/ext/fiber/fiber.c)
I was just bitten by it again preparing the changelog (stuck with `NoMethodError` and for a few minutes thought the build is broken), is there a reason to have it this way?..
Just clarifying for docs sake, at least.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:101898] [Ruby master Feature#17407] Fiber.current and require 'fiber'
2020-12-18 23:08 [ruby-core:101529] [Ruby master Misc#17407] Fiber.current and require 'fiber' zverok.offline
2020-12-19 11:22 ` [ruby-core:101537] " eregontp
@ 2021-01-04 1:47 ` nobu
2021-01-13 6:52 ` [ruby-core:102053] " ko1
2 siblings, 0 replies; 4+ messages in thread
From: nobu @ 2021-01-04 1:47 UTC (permalink / raw)
To: ruby-core
Issue #17407 has been updated by nobu (Nobuyoshi Nakada).
https://github.com/nobu/ruby/tree/fiber-builtin
----------------------------------------
Feature #17407: Fiber.current and require 'fiber'
https://bugs.ruby-lang.org/issues/17407#change-89739
* Author: zverok (Victor Shepelev)
* Status: Open
* Priority: Normal
----------------------------------------
Maybe it is not the right time to ask, but why one need to do `require 'fiber'` before using `Fiber.current`?
For what I can see,
* it is this way since [their introduction](https://docs.ruby-lang.org/en/2.0.0/Fiber.html#method-c-current),
* the actual code is defined in the core [cont.c](https://github.com/ruby/ruby/blob/master/cont.c#L2480)
* the `ext/fiber.c` [does very little](https://github.com/ruby/ruby/blob/master/ext/fiber/fiber.c)
I was just bitten by it again preparing the changelog (stuck with `NoMethodError` and for a few minutes thought the build is broken), is there a reason to have it this way?..
Just clarifying for docs sake, at least.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:102053] [Ruby master Feature#17407] Fiber.current and require 'fiber'
2020-12-18 23:08 [ruby-core:101529] [Ruby master Misc#17407] Fiber.current and require 'fiber' zverok.offline
2020-12-19 11:22 ` [ruby-core:101537] " eregontp
2021-01-04 1:47 ` [ruby-core:101898] [Ruby master Feature#17407] " nobu
@ 2021-01-13 6:52 ` ko1
2 siblings, 0 replies; 4+ messages in thread
From: ko1 @ 2021-01-13 6:52 UTC (permalink / raw)
To: ruby-core
Issue #17407 has been updated by ko1 (Koichi Sasada).
I still think `Fiber.current` is not needed because `Fiber#transfer` is not easy feature to use.
However, Fiber scheduler is introduced and they can be utilize.
So I'm okay for nobu's PR.
----------------------------------------
Feature #17407: Fiber.current and require 'fiber'
https://bugs.ruby-lang.org/issues/17407#change-89909
* Author: zverok (Victor Shepelev)
* Status: Open
* Priority: Normal
----------------------------------------
Maybe it is not the right time to ask, but why one need to do `require 'fiber'` before using `Fiber.current`?
For what I can see,
* it is this way since [their introduction](https://docs.ruby-lang.org/en/2.0.0/Fiber.html#method-c-current),
* the actual code is defined in the core [cont.c](https://github.com/ruby/ruby/blob/master/cont.c#L2480)
* the `ext/fiber.c` [does very little](https://github.com/ruby/ruby/blob/master/ext/fiber/fiber.c)
I was just bitten by it again preparing the changelog (stuck with `NoMethodError` and for a few minutes thought the build is broken), is there a reason to have it this way?..
Just clarifying for docs sake, at least.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-13 6:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 23:08 [ruby-core:101529] [Ruby master Misc#17407] Fiber.current and require 'fiber' zverok.offline
2020-12-19 11:22 ` [ruby-core:101537] " eregontp
2021-01-04 1:47 ` [ruby-core:101898] [Ruby master Feature#17407] " nobu
2021-01-13 6:52 ` [ruby-core:102053] " ko1
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).