use heap instead of list for idle tasks