<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait_to_start(self, allow_failure=False):
 """ Wait for the thread to actually starts. """

        self._started.wait()

        if self._crashed and not allow_failure:
            self._thread.join()
            raise RuntimeError('Setup failed, see {} Traceback'
                               'for details.'.format(self._thread.name))