(self, timeout: int = None)
Wait for the process to finish execution without blocking the main thread.
Wait for the process to finish execution without blocking the main thread.
Wait for the process to finish execution without blocking the main thread .
async def join(self, timeout: int = None) -> None:
        """Wait for the process to finish execution without blocking the main thread."""
        if not self.is_alive() and self.exitcode is None:
            raise ValueError("must start process before joining it")

        if timeout is not None:
            return await asyncio.wait_for(self.join(), timeout)

        while self.exitcode is None:
            await asyncio.sleep(0.005)
async def join ( self , timeout : int = None ) -> None : if not self . is_alive ( ) and self . exitcode is None : raise ValueError ( "must start process before joining it" ) if timeout is not None : return await asyncio . wait_for ( self . join ( ) , timeout ) while self . exitcode is None : await asyncio . sleep ( 0.005 )