[#109207] [Ruby master Feature#18915] New error class: NotImplementedYetError or scope change for NotImplementedYet — Quintasan <noreply@...>
Issue #18915 has been reported by Quintasan (Michał Zając).
18 messages
2022/07/14
[ruby-core:109144] [Ruby master Feature#18004] Add Async to the stdlib
From:
"shan (Shannon Skipper)" <noreply@...>
Date:
2022-07-05 17:06:40 UTC
List:
ruby-core #109144
Issue #18004 has been updated by shan (Shannon Skipper).
Is it better to retitle this issue to align with larskanis's proposal or close this and start a new issue? Happy to do either!
----------------------------------------
Feature #18004: Add Async to the stdlib
https://bugs.ruby-lang.org/issues/18004#change-98284
* Author: shan (Shannon Skipper)
* Status: Open
* Priority: Normal
----------------------------------------
Adding Async to the stdlib would signal a clear concurrency story for Ruby 3 to compliment Ractor-based parallelism. I don't know how ioquatix feels about adding Async to stdlib, but I wanted to propose it since we keep getting questions about concurrent I/O with Ruby 3 in the community.
Ractors get a fair amount of attention on the #ruby IRC channels and Ruby Discord. When Ractors are discussed, question around concurrent I/O in Ruby 3 often follow. Folk don't seem to be aware of Async, so we often cite the Ruby 3 release notes Async Net::HTTP example shown below.
``` ruby
require 'async'
require 'net/http'
require 'uri'
Async do
["ruby", "rails", "async"].each do |topic|
Async do
Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}")
end
end
end
```
The main downside I see for this proposal is the bloat from Async's several gem dependencies. For what it's worth, nio4r has been a staple for a long time and is also the only dependency of Puma.
```
Async is a composable asynchronous I/O framework for Ruby based on nio4r and timers.
```
Async is just so useful it would be awesome to add to the stdlib. It fills and important gap for concurrent I/O with Ruby 3 and would be exciting to see included in a future release.
See https://github.com/socketry/async#readme
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>