Fiber Concurrency
Posted4 months agoActive4 months ago
honeyryderchuck.gitlab.ioTechstory
calmpositive
Debate
20/100
RubyConcurrencyFibersAsync Programming
Key topics
Ruby
Concurrency
Fibers
Async Programming
The post discusses the use of fibers for concurrency in Ruby, sparking a discussion about the nuances of async programming and the benefits of Ruby's fiber implementation.
Snapshot generated from the HN discussion
Discussion Activity
Light discussionFirst comment
42m
Peak period
4
0-1h
Avg / period
1.8
Comment distribution11 data points
Loading chart...
Based on 11 loaded comments
Key moments
- 01Story posted
Sep 5, 2025 at 3:44 AM EDT
4 months ago
Step 01 - 02First comment
Sep 5, 2025 at 4:26 AM EDT
42m after posting
Step 02 - 03Peak activity
4 comments in 0-1h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 5, 2025 at 10:13 AM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45136008Type: storyLast synced: 11/20/2025, 5:54:29 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
It'd be helpful to at least set the premise for those of us on the outside.
It's also been done in a way that is transparent and practically colorless (in contrast to async/await), AND is competitive performance wise with the big dogs.
I expect it to gain in popularity over the coming years.
Ruby's standard library was not littered with too many sync helpers, so making them fiber capable without much standard library effect is a big win. In Python, explicit coloring is required and it's easy to block your asyncio coroutines with sync calls. In .NET, it is nice that tasks can be blocking or not, but there is one fixed global static thread pool for all tasks and so one is tacitly encouraged to do CPU bound work in a task (granted CPU bound fibers are an issue in Ruby too), not to mention issues with changing the default scheduler. In Java, virtual threads take a Ruby-esque approach of letting most code work unchanged, but the Java concurrency standard library is large with slight potential incompatibilities.
Ruby is both 1) lucky it did not have a large standard library of thread primitives to adapt, and 2) smart in that they can recognize when they are in a fiber-scheduler-enabled environment or not.
Granted that lack of primitives sure does hurt if you want to use concurrency utilities like combinators. And at that point, you reach for a third party and you're back in the situation of not being as portable/obvious.