Sha256: 08dfa4329c47b88cc0c9501f4a746e0e5e153cf3be7f43ee5c36834671cb0774
Contents?: true
Size: 440 Bytes
Versions: 17
Compression:
Stored size: 440 Bytes
Contents
# frozen_string_literal: true require_relative '../../polyphony' module Polyphony # Implements a unidirectional communication channel along the lines of Go # (buffered) channels. class Channel < Polyphony::Queue alias_method :receive, :shift # Closes the channel, resuming any fibers waiting on the channel with # a Polyphony::MoveOn exception def close flush_waiters(Polyphony::MoveOn.new) end end end
Version data entries
17 entries across 17 versions & 1 rubygems