Making _start_all_threads thread-safe.