Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 737 Bytes

README.md

File metadata and controls

47 lines (31 loc) · 737 Bytes

e8r

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.

Installation

Add to your Gemfile:

gem 'e8r'

Then:

bundle install

Usage

E8R patches into Enumerable and Enumerator to add these new capabilities.

Async

example = (1..100).to_a
accum = [ ]

example.async do |e|
  Async do
    accum << e * 2
  end
end.wait

accum