Use atomics for statistics keeping rather than the mutex