Class: RbEAI::Hello
- Inherits:
-
Object
- Object
- RbEAI::Hello
- Defined in:
- lib/rbeai/PipeTask.rb,
lib/rbeai/WorkerPool.rb
Instance Attribute Summary collapse
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
- #doJob(aQueue, obj) ⇒ Object
- #getItemsNext(numItems) ⇒ Object
-
#initialize ⇒ Hello
constructor
A new instance of Hello.
- #sayHello(obj, i) ⇒ Object
Constructor Details
#initialize ⇒ Hello
Returns a new instance of Hello.
193 194 195 |
# File 'lib/rbeai/PipeTask.rb', line 193 def initialize @size = 20 end |
Instance Attribute Details
#size ⇒ Object
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 |