lib/pigeon/queue.rb
def claim(task)
    @filters.synchronize do
      if (@claimable_task[task])
        @claimable_task[task] = false
      elsif (@tasks.delete(task))
        @next_task.each do |filter_name, next_task|
          if (task == next_task)
            @next_task[filter_name] = nil
          end
        end
      else
        raise TaskNotQueued, task
      end
    end
      
    task
  end
# Claims a task. This is used to indicate that the task will be processed
# without having to be inserted into the queue.
Claims a task. This is used to indicate that the task will be processed
without having to be inserted into the queue.
Claims a task . This is used to indicate that the task will be processed without having to be inserted into the queue .
def claim(task)
    @filters.synchronize do
      if (@claimable_task[task])
        @claimable_task[task] = false
      elsif (@tasks.delete(task))
        @next_task.each do |filter_name, next_task|
          if (task == next_task)
            @next_task[filter_name] = nil
          end
        end
      else
        raise TaskNotQueued, task
      end
    end
    task
  end
def claim ( task ) @filters . synchronize do if ( @claimable_task [ task ] ) @claimable_task [ task ] = false elsif ( @tasks . delete ( task ) ) @next_task . each do | filter_name , next_task | if ( task == next_task ) @next_task [ filter_name ] = nil end end else raise TaskNotQueued , task end end task end
Claims a task.
Claims a task .
task