Class: EventQ::WorkerProcess

Inherits:
Object
  • Object
show all
Defined in:
lib/eventq/worker_status.rb

Overview

Class that is used to represent a process and its associated threads.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pid) ⇒ WorkerProcess

Returns a new instance of WorkerProcess.



49
50
51
52
# File 'lib/eventq/worker_status.rb', line 49

def initialize(pid)
  self.pid = pid
  @threads = Concurrent::Array.new
end

Instance Attribute Details

#pidObject

Returns the value of attribute pid.



47
48
49
# File 'lib/eventq/worker_status.rb', line 47

def pid
  @pid
end

#threadsObject (readonly)

Returns the value of attribute threads.



48
49
50
# File 'lib/eventq/worker_status.rb', line 48

def threads
  @threads
end