Add mutex to compute_primes.