INNER CODE UNIT · Python

until

mars-tw/anti-gambling-trader-tw · core/ui/server.py:289

        until = time.monotonic() + max(0.0, float(timeout))
        current = threading.current_thread()
        with self._owned_lock:
            workers = [
                worker
                for worker in self._owned_handler_threads.values()
                if worker is not current
            ]
        for worker in workers:
            remaining = until - time.monotonic()
            if remaining <= 0:
                break
            worker.join(remaining)
        with self._owned_lock:
            return not any(
                worker.is_alive()
                for worker in self._owned_handler_threads.values()
                if worker is not current

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…