Sha256: f16427f1b1c75f4f697b7d638a6d03162f7b5b336be9aa0162fca6d1ceb6beff

Contents?: true

Size: 327 Bytes

Versions: 57

Compression:

Stored size: 327 Bytes

Contents

# frozen_string_literal: true

require_relative './exceptions'

module Polyphony
  # Implements a unidirectional communication channel along the lines of Go
  # (buffered) channels.
  class Channel < Polyphony::Queue
    alias_method :receive, :shift

    def close
      flush_waiters(Polyphony::MoveOn.new)
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
polyphony-0.79 lib/polyphony/core/channel.rb
polyphony-0.78 lib/polyphony/core/channel.rb
polyphony-0.77 lib/polyphony/core/channel.rb
polyphony-0.76 lib/polyphony/core/channel.rb
polyphony-0.75 lib/polyphony/core/channel.rb
polyphony-0.74 lib/polyphony/core/channel.rb
polyphony-0.73.1 lib/polyphony/core/channel.rb
polyphony-0.73 lib/polyphony/core/channel.rb
polyphony-0.72 lib/polyphony/core/channel.rb
polyphony-0.71 lib/polyphony/core/channel.rb
polyphony-0.70 lib/polyphony/core/channel.rb
polyphony-0.69 lib/polyphony/core/channel.rb
polyphony-0.68 lib/polyphony/core/channel.rb
polyphony-0.67 lib/polyphony/core/channel.rb
polyphony-0.66 lib/polyphony/core/channel.rb
polyphony-0.65 lib/polyphony/core/channel.rb
polyphony-0.64 lib/polyphony/core/channel.rb
polyphony-0.63 lib/polyphony/core/channel.rb
polyphony-0.62 lib/polyphony/core/channel.rb
polyphony-0.61 lib/polyphony/core/channel.rb