def fire(self, *args, **kargs):
self._time_secs_old = time.time()<EOL>with self._hlock:<EOL><INDENT>handler_list = copy.copy(self._handler_list)<EOL><DEDENT>result_list = []<EOL>for handler in handler_list:<EOL><INDENT>if self._sync_mode:<EOL><INDENT>result = self._execute(handler, *args, **kargs)<EOL>if isinstance(result, tuple) and len(result) == <NUM_LIT:3> and isinstance(result[<NUM_LIT:1>], Exception):<EOL><INDENT>one_res_tuple = (False, self._error(result), handler)<EOL><DEDENT>else:<EOL><INDENT>one_res_tuple = (True, result, handler)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>EventSystem._async_queue.put((handler, args, kargs))<EOL>one_res_tuple = (None, None, handler)<EOL><DEDENT>result_list.append(one_res_tuple)<EOL><DEDENT>time_secs_new = time.time()<EOL>self.duration_secs = time_secs_new - self._time_secs_old<EOL>self._time_secs_old = time_secs_new<EOL>return result_list<EOL>
collects results of all executed handlers