Method: Fairy::Controller#initialize
- Defined in:
- lib/fairy/controller.rb
#initialize(id) ⇒ Controller
Returns a new instance of Controller.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/fairy/controller.rb', line 45 def initialize(id) @id = id @deepconnect = nil @master_deepspace = nil @master = nil @client = nil @stdout_mutex = Mutex.new @services = {} @create_processor_mutex = Mutex.new # deepspace -> processor_id @deepspace2processor_id = {} # processor -> no of reserve @reserves = {} @reserves_mutex = Mutex.new @reserves_cv = XThread::ConditionVariable.new # bjob -> [processor, ...] @bjob2processors = {} @bjob2processors_mutex = Mutex.new @bjob2processors_cv = XThread::ConditionVariable.new # processor -> no of active ntasks @no_active_ntasks = {} @no_active_ntasks_mutex = Mutex.new @no_active_ntasks_cv = XThread::ConditionVariable.new @pool_dict = PoolDictionary.new end |