I register the idle task when there are events in the idle queue and I remove the idle task once those events have been processed. This should cut down on CPU usage when nothing is happening.