E8R is a series of exensions to Enumerable to expand the contexts in which that approach can be used.
The initial targets are:
- Async tasks
- Threads using an optional thread pool
- Ractors, using an optional ractor pool
This is currently an experimental project. The names are all arbitrary and subject to change.
Add to your Gemfile:
gem 'e8r'Then:
bundle installE8R patches into Enumerable and Enumerator to add these new capabilities.
example = (1..100).to_a
accum = [ ]
example.async do |e|
Async do
accum << e * 2
end
end.wait
accum