Class: Zapp::Pipe

Inherits:
Ractor
  • Object
show all
Defined in:
lib/zapp/pipe.rb

Overview

Light wrapper around a Ractor for piping messages CSP style

Class Method Summary collapse

Class Method Details

.newObject



6
7
8
9
10
11
12
# File 'lib/zapp/pipe.rb', line 6

def self.new
  super do
    loop do
      Ractor.yield(Ractor.receive)
    end
  end
end