made PrimesIterable threadsafe