Show HN: AsyncFutures – A Ruby gem for asynchronous/concurrent code execution(rubygems.org)
rubygems.org
Show HN: AsyncFutures – A Ruby gem for asynchronous/concurrent code execution
https://rubygems.org/gems/async_futures/versions/0.1.2
1 comments
Here are the generated docs. I tried to be thorough with these right from the beginning too.
https://rubydoc.info/gems/async_futures
https://rubydoc.info/gems/async_futures/index
https://rubydoc.info/gems/async_futures
https://rubydoc.info/gems/async_futures/index
This was actually the impetus for creating this Gem: the core Ruby concurrency primitives all have different APIs and subtly different behavior even for the APIs that initially look similar. For example, `join` on Ractor and Thread instances do NOT behave the same. This Gem adds Executors that expose near identical behavior across all of them and return a Future object with identical API and behavior across all of them.
I've been working on this Gem for a few months in my spare time. I just published the Gem and made the git repo public a few minutes ago. Please feel free to review the code, test out the gem, and provide your feedback.
As a footnote: this was not vibe coded. I wanted to learn through experience how to correctly write concurrent code, so using AI would have defeated the purpose. Also, I don't particularly enjoy writing/generating code via AI, so that would have made vibe coding this doubly pointless.
The Gem has 100% line and branch coverage on CRuby 4.0 and is 0BSD licensed.
Thank you.