1. A computer-implemented method for processing a plurality of tasks across a group of threads, the method comprising: retrieving a first item from a queue; determining that the first item does not comprise a task; determining whether the first item comprises a wait event or a signaling event; in response, decrementing a count; and removing the first item from the queue.