Class: Mutant::Parallel::Connection Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/parallel/connection.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: Error, Frame, Reader

Constant Summary collapse

HEADER_FORMAT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'N'
HEADER_SIZE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

4
MAX_BYTES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

(2**32).pred
MAX_LOG_CHUNK =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

4096

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_pipes(marshal:, reader:, writer:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



156
157
158
159
160
161
162
# File 'lib/mutant/parallel/connection.rb', line 156

def self.from_pipes(marshal:, reader:, writer:)
  new(
    marshal:,
    reader:  Frame.new(io: reader.to_reader),
    writer:  Frame.new(io: writer.to_writer)
  )
end

Instance Method Details

#receive_valueObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



152
# File 'lib/mutant/parallel/connection.rb', line 152

def receive_value = marshal.load(reader.receive_value)

#send_value(value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



154
# File 'lib/mutant/parallel/connection.rb', line 154

def send_value(value) = tap { writer.send_value(marshal.dump(value)) }