threadsafe replacement for flint_primes (work in progress)