Sha256: 1af7a3cf8994625886f8cbbbfcff1cd32182765a59fb9a26402339d900fde44a
Contents?: true
Size: 953 Bytes
Versions: 1
Compression:
Stored size: 953 Bytes
Contents
module Mutant module Actor # Unbound mailbox class Mailbox # Initialize new unbound mailbox # # @return [undefined] # # @api private # def initialize @mutex = Mutex.new @messages = [] @receiver = Receiver.new(@mutex, @messages) freeze end # Return receiver # # @return [Receiver] # # @api private # attr_reader :receiver # Return actor that is able to read mailbox # # @param [Thread] thread # # @return [Actor] # # @api private # def actor(thread) Actor.new(thread, self) end # Return sender to mailbox # # @param [Thread] thread # # @return [Sender] # # @api private # def sender(thread) Sender.new(thread, @mutex, @messages) end end # Mailbox end # Actor end # Mutant
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mutant-0.7.1 | lib/mutant/actor/mailbox.rb |