Method: ConcurrentWorker::ConcurrentProcess#cncr_block

Defined in:
lib/concurrent_worker.rb

#cncr_blockObject



327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/concurrent_worker.rb', line 327

def cncr_block
  @ipc_channel = IPCDuplexChannel.new
  @c_pid = fork do
    @ipc_channel.choose_io
    begin
      yield_base_block
    rescue
      @ipc_channel.send($!)
    ensure
      @ipc_channel.send(:worker_loop_finished)
    end
  end
  @ipc_channel.choose_io
  @rcv_thread = set_rcv_thread
end