Sha256: 97dea2266466a9daeb3e7b75018c0d236fe3a146db72cf276311a7521e4e3306

Contents?: true

Size: 253 Bytes

Versions: 4

Compression:

Stored size: 253 Bytes

Contents

# frozen_string_literal: true

module Zapp
  # Light wrapper around a Ractor for piping messages CSP style
  module Pipe
    def self.new
      Ractor.new do
        loop do
          Ractor.yield(Ractor.receive)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zapp-0.2.4 lib/zapp/pipe.rb
zapp-0.2.3 lib/zapp/pipe.rb
zapp-0.2.2 lib/zapp/pipe.rb
zapp-0.2.1 lib/zapp/pipe.rb