Do we need to use low numbers? It would be simpler just to keep track of the highest number used and allocate the next one from that. It would start to be an issue once we've run somewhere over 9 quadrillion tasks, but we probably wouldn't notice, having been engulfed by the sun or something well before then :)