class Worker::Thread

Worker::Thread

Public Instance Methods

id() click to toggle source
# File lib/spark/worker/worker.rb, line 166
def id
  ::Thread.current.object_id
end

Private Instance Methods

kill_worker() click to toggle source
# File lib/spark/worker/worker.rb, line 189
def kill_worker
  Thread.current.kill
end
load_command() click to toggle source
Calls superclass method
# File lib/spark/worker/worker.rb, line 172
def load_command
  $mutex_for_command.synchronize { super }
end
load_iterator() click to toggle source

Threads changing for reading is very slow Faster way is do it one by one

Calls superclass method
# File lib/spark/worker/worker.rb, line 178
def load_iterator
  # Wait for incoming connection for preventing deadlock
  if jruby?
    socket.io_wait
  else
    socket.wait_readable
  end

  $mutex_for_iterator.synchronize { super }
end