class Master::Thread
¶ ↑
Public Class Methods
new()
click to toggle source
Calls superclass method
Master::Base::new
# File lib/spark/worker/master.rb, line 115 def initialize ::Thread.abort_on_exception = true # For synchronous access to socket IO $mutex_for_command = Mutex.new $mutex_for_iterator = Mutex.new super end
Public Instance Methods
create_worker()
click to toggle source
# File lib/spark/worker/master.rb, line 125 def create_worker ::Thread.new do Worker::Thread.new(@port).run end end
kill_worker()
click to toggle source
# File lib/spark/worker/master.rb, line 131 def kill_worker worker_id = @socket.read_long thread = ObjectSpace._id2ref(worker_id) thread.kill rescue nil end