Method: WorkQueue#enqueue_p

Defined in:
lib/work_queue.rb

#enqueue_p(proc, *params) ⇒ Object

Schedules the given Proc for future execution by a worker thread. If there is no space left in the queue, waits until space becomes available.

Parameter(s)

  • proc - Proc to be executed.

  • params - Parameters passed to the given proc.

Example(s)

wq = WorkQueue.new
wq.enqueue_p(Proc.new { |obj| ... }, "Parameter")


121
122
123
# File 'lib/work_queue.rb', line 121

def enqueue_p(proc, *params)
  enqueue proc, params
end