class PromisePool::Task

Public Instance Methods

call(working_thread) click to toggle source
# File lib/promise_pool/task.rb, line 5
def call working_thread
  mutex.synchronize do
    return if cancelled
    self.thread = working_thread
  end
  job.call
  true
end
cancel() click to toggle source
# File lib/promise_pool/task.rb, line 14
def cancel
  self.cancelled = true
end