Class: Thread
Defined Under Namespace
Classes: PPipeIRecv
Constant Summary collapse
- @@ppipe_threads =
[]
Class Method Summary collapse
Class Method Details
.ppipe_join ⇒ Object
297 298 299 300 301 302 |
# File 'lib/parallelpipes.rb', line 297 def self.ppipe_join @@ppipe_threads.each do |thread| raise PPipeIRecv.new("i_recv call with label '#{thread[:label]}' has not returned. Please kill it or make sure it returns, before calling fork") if thread[:ppipe_message] and thread.alive? thread.join if thread.alive? and not thread == Thread.current end end |
.ppipe_list_live_ids ⇒ Object
end
309 310 311 |
# File 'lib/parallelpipes.rb', line 309 def Thread.ppipe_list_live_ids return Thread.list.inject([]){|arr, thread| arr.push thread.object_id if thread.alive?; arr} end |
.ppipe_new(*args, &block) ⇒ Object
290 291 292 293 294 |
# File 'lib/parallelpipes.rb', line 290 def self.ppipe_new(*args, &block) th = new(*args, &block) @@ppipe_threads.push th return th end |