INNER CODE UNIT · Python

handle_market

FLOCK4H/Dexter · Dexter.py:417

    async def handle_market(self):
        while not self.stop_event.is_set():
            try:
                log, program = await asyncio.wait_for(self.logs.get(), timeout=0.5)
            except asyncio.TimeoutError:
                continue
            if self.stop_event.is_set():
                break
            if log:
                task = asyncio.create_task(self.handle_single_log(log, program))
                self.active_tasks.add(task)

                def _cleanup(_):
                    self.active_tasks.discard(task)
                task.add_done_callback(_cleanup)

    def _is_expected_shutdown_error(self, exc: BaseException) -> bool:
        if not (self.is_closing or self.stop_event.is_set()):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…