lib/pigeon/queue.rb
def observe(filter_name = nil, &block)
    raise BlockRequired unless (block_given?)
    
    @observers.synchronize do
      set = @observers[filter_name] ||= [ ]

      set << block
    end

    assign_next_task(filter_name)
  end
# Sets up a callback for the queue that will execute the block if new tasks
# are added to the queue. If filter_name is specified, this block will be
# run for tasks matching that filtered subset.
Sets up a callback for the queue that will execute the block if new tasks
are added to the queue. If filter_name is specified, this block will be
run for tasks matching that filtered subset.
Sets up a callback for the queue that will execute the block if new tasks are added to the queue . If filter_name is specified this block will be run for tasks matching that filtered subset .
def observe(filter_name = nil, &block)
    raise BlockRequired unless (block_given?)
    @observers.synchronize do
      set = @observers[filter_name] ||= [ ]
      set << block
    end
    assign_next_task(filter_name)
  end
def observe ( filter_name = nil , & block ) raise BlockRequired unless ( block_given? ) @observers . synchronize do set = @observers [ filter_name ] ||= [ ] set << block end assign_next_task ( filter_name ) end
Sets up a callback for the queue that will execute the block if new tasks
are added to the queue.
Sets up a callback for the queue that will execute the block if new tasks are added to the queue .
filter_name
block