That’s your problem. PSA: Thread-local state is no longer recommended; Common misconceptions about threadid() and nthreads()