Prevent starting a thread twice.