currently our RNG functions on the CPU are not thread-safe, and one can run into weird segfaults if running them from multiple threads.