Class: Bundler::ParallelWorkers::UnixWorker::JobHandler

Inherits:
Struct
  • Object
show all
Defined in:
lib/bundler/parallel_workers/unix_worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#io_rObject

Returns the value of attribute io_r

Returns:

  • (Object)

    the current value of io_r



8
9
10
# File 'lib/bundler/parallel_workers/unix_worker.rb', line 8

def io_r
  @io_r
end

#io_wObject

Returns the value of attribute io_w

Returns:

  • (Object)

    the current value of io_w



8
9
10
# File 'lib/bundler/parallel_workers/unix_worker.rb', line 8

def io_w
  @io_w
end

#pidObject

Returns the value of attribute pid

Returns:

  • (Object)

    the current value of pid



8
9
10
# File 'lib/bundler/parallel_workers/unix_worker.rb', line 8

def pid
  @pid
end

Instance Method Details

#work(obj) ⇒ Object



9
10
11
12
13
14
# File 'lib/bundler/parallel_workers/unix_worker.rb', line 9

def work(obj)
  Marshal.dump obj, io_w
  Marshal.load io_r
rescue IOError, Errno::EPIPE
  nil
end