Method: Fairy::CFilter#initialize
- Defined in:
- lib/fairy/master/c-filter.rb
#initialize(controller, opts, *rests) ⇒ CFilter
Returns a new instance of CFilter.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fairy/master/c-filter.rb', line 23 def initialize(controller, opts, *rests) Log::info self, "CREATE BJOB: #{self.class}" @controller = controller @opts = opts @opts = {} unless @opts @job_pool_dict = PoolDictionary.new @number_of_nodes = nil # @number_of_nodes_mutex = Mutex.new # @number_of_nodes_cv = XThread::ConditionVariable.new @nodes = [] @nodes_for_next_filters = [] @nodes_mutex = Mutex.new @nodes_cv = XThread::ConditionVariable.new @nodes_status = {} @nodes_status_mutex = Mutex.new @nodes_status_cv = XThread::ConditionVariable.new @controller.register_bjob(self) @create_node_thread = nil # gbreakのときに安全に@create_node_threadスレッドをとめるため @create_node_mutex = Mutex.new @context = Context.new(self) start_watch_node_status if watch_status? end |