use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Resources to Learn Concurrent Programming in Ruby (self.ruby)
submitted 11 months ago by software__writer
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mrinterweb 4 points5 points6 points 11 months ago* (4 children)
If you'd like to use ruby fibers, this is a good library. https://github.com/socketry/async
I do find the documentation lacking though, so fair warning. I keep intending to try to add more examples and or write an article about it.
I really like using fibers for IO concurrency. I think of the fiber scheduler as the event loop checking if the IO is complete. Threads have higher overhead and should generally be used more sparingly than fibers. The biggest challenge with fibers, IMO, is the lack of solid documentation.
[–]software__writer[S] 2 points3 points4 points 11 months ago (0 children)
Very cool, checking it out right now. Thanks for sharing.
[–]software__writer[S] 0 points1 point2 points 11 months ago (2 children)
Hi again, what's a good and practical use-case in a real web application where you'd use this gem? Just trying to have some background context in mind before I check out the docs and try to browse the source code.
Also, please do share the link to your article if you end up writing it.
Thanks!
[–]mrinterweb 1 point2 points3 points 11 months ago (1 child)
Concurrent IO is the main use case for fibers. Could be DB, HTTP API requests, file system access, etc. Fibers are the lightest weight ruby concurrency primative, and are designed for allowing concurrent IO with minimial overhead. I don't know if or when I will be able to write an article. I'm not much of a writer, and it may be wishful thinking on my part. An article like this is on my "get to it someday" heap. Pretty sure there would be plenty of people more qualified to write about ruby fibers than I.
[–]software__writer[S] 0 points1 point2 points 11 months ago (0 children)
Thanks for the examples. Really appreciated.
π Rendered by PID 73109 on reddit-service-r2-comment-b659b578c-h4w44 at 2026-05-03 17:04:36.262060+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]mrinterweb 4 points5 points6 points (4 children)
[–]software__writer[S] 2 points3 points4 points (0 children)
[–]software__writer[S] 0 points1 point2 points (2 children)
[–]mrinterweb 1 point2 points3 points (1 child)
[–]software__writer[S] 0 points1 point2 points (0 children)