Try making _active_count a thread local.