Class: RbEAI::Hello

Inherits:
Object
  • Object
show all
Defined in:
lib/rbeai/PipeTask.rb,
lib/rbeai/WorkerPool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHello

Returns a new instance of Hello.



193
194
195
# File 'lib/rbeai/PipeTask.rb', line 193

def initialize
  @size = 20
end

Instance Attribute Details

#sizeObject

Returns the value of attribute size.



191
192
193
# File 'lib/rbeai/PipeTask.rb', line 191

def size
  @size
end

Instance Method Details

#doJob(aQueue, obj) ⇒ Object



197
198
199
200
# File 'lib/rbeai/PipeTask.rb', line 197

def doJob(aQueue, obj)    
  print "#{Thread.current.to_s}-#{obj}\n"
  aQueue.enq("true")
end

#getItemsNext(numItems) ⇒ Object



203
204
205
# File 'lib/rbeai/PipeTask.rb', line 203

def getItemsNext(numItems)
  return 200
end

#sayHello(obj, i) ⇒ Object



59
60
61
# File 'lib/rbeai/WorkerPool.rb', line 59

def sayHello(obj, i)    
  print obj.object_id,"-#{obj}-#{i}\n"
end