def mark_main_tasks_as_failed(self):
if self.am_i_main_thread:<EOL><INDENT>return<EOL><DEDENT>with self._main_thread_lock:<EOL><INDENT>self.main_failed = True<EOL><DEDENT>
Flags to the main thread that all it's tasks sholud fail

Returns:
    None