Added function queueProcessorLoop.