Class: Thread
Defined Under Namespace
Classes: PPipeIRecv
Constant Summary collapse
- @@ppipe_threads =
[]
Class Method Summary collapse
Class Method Details
.ppipe_join ⇒ Object
281 282 283 284 285 286 |
# File 'lib/parallelpipes.rb', line 281 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
293 294 295 |
# File 'lib/parallelpipes.rb', line 293 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
274 275 276 277 278 |
# File 'lib/parallelpipes.rb', line 274 def self.ppipe_new(*args, &block) th = new(*args, &block) @@ppipe_threads.push th return th end |