Class: PPipe

Inherits:
Object show all
Includes:
Controller, Log, MethodMissing, Methods, Reader
Defined in:
lib/parallelpipes.rb

Defined Under Namespace

Modules: Controller, Log, MethodMissing, Methods, Reader Classes: Ambiguity, ControllerError, DeadMutex, DeadParallelPipe, DeadPipe, Message, NoController, PPipeFatal, RecvTimeout, SelfReference, ThreadingError, UnassignedPipe

Constant Summary collapse

@@thread_safe =

class_accessor :print_messages, :thread_safe @@print_messages = false

true

Constants included from Controller

Controller::CON

Instance Attribute Summary

Attributes included from Controller

#controller

Attributes included from Methods

#is_root, #mpn, #redirect, #thread_safe, #tp_required, #tt_required

Attributes included from Log

#verbosity

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MethodMissing

#method_missing

Methods included from Controller

#auto_load_save, #controller_alive?, #controller_refresh=, #controller_woken?, #get_shared_resource, #lock, #mutex_locked?, #put_controller_to_sleep, #resource_locked?, #return_shared_resource, #shared_resource, #start_controller, #stop_controller, #synchronize, #unlock, #wake_controller

Methods included from Methods

#assigned?, #die, #exit, #finish, #fork, #gets, #i_recv, #i_send, #kill_all, #kill_pipe, #pids, #puts, #read_all, #set_up_pipes, #t_recv, #tid, #user_end, #w_recv, #w_send, #wait, #wait_till_assigned, #waitall

Methods included from Log

clean_up, io=, #log, log_file, log_file=

Methods included from Reader

#configure_reader, #get_line, #read_pipe

Constructor Details

#initialize(*args) ⇒ PPipe

Make a new PPipe. All this does is call Methods#set_up_pipes(*args) - see this function for documentation.



791
792
793
# File 'lib/parallelpipes.rb', line 791

def initialize(*args)
	set_up_pipes(*args)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PPipe::MethodMissing

Class Method Details

.log_file_name=(string) ⇒ Object

Set a file to write log messages to. Useful for debugging.



785
786
787
# File 'lib/parallelpipes.rb', line 785

def self.log_file_name=(string)
    Log.file_name = string
end

.log_io=(io_oject) ⇒ Object

Set an io object to write log messages to. Useful for debugging. Can be e.g. $stderr



779
780
781
# File 'lib/parallelpipes.rb', line 779

def self.log_io=(io_oject)
    Log.io = io_object
end