Added functions queueProcessor and queueProcessorLoop for the infinite queue.