MCPcopy Create free account
hub / github.com/chatmail/core / run

Method run

python/src/deltachat/events.py:250–262  ·  view source on GitHub ↗

get and run events until shutdown.

(self)

Source from the content-addressed store, hash-verified

248 self.join(timeout=timeout)
249
250 def run(self) -> None:
251 """get and run events until shutdown."""
252 with self.log_execution("EVENT THREAD"):
253 event_emitter = ffi.gc(
254 lib.dc_get_event_emitter(self.account._dc_context),
255 lib.dc_event_emitter_unref,
256 )
257 while not self._marked_for_shutdown:
258 with self.swallow_and_log_exception("Unexpected error in event thread"):
259 event = lib.dc_get_next_event(event_emitter)
260 if event == ffi.NULL or self._marked_for_shutdown:
261 break
262 self._process_event(event)
263
264 def _process_event(self, event) -> None:
265 evt = lib.dc_event_get_id(event)

Calls 3

log_executionMethod · 0.95
_process_eventMethod · 0.95

Tested by 1