curio/task.py
async def join(self):
        '''
        Wait for tasks in a task group to terminate according to the
        wait policy set for the group.  
        '''
        try:
            if self._wait is None:
                # We wait for no-one. Tasks get cancelled on return.
                return

            while self._finished or self._running:
                # If nothing is finished, we wait for something to complete
                while not self._finished:
                    await self._sema.acquire()

                # Examine all currently finished tasks
                while self._finished:
                    task = self._finished.popleft()
                    # Check if it's the first completed task
                    if self.completed is None:
                        # For wait=object, the self.completed attribute is the first non-None result
                        if not ((self._wait is object) and (not task.exception) and (task.result is None)):
                            self.completed = task 

                    # What happens next depends on the wait and error handling policies
                    if task.exception or \
                       (self._wait is any) or \
                       ((self._wait is object) and (task.result is not None)):
                        return

        # Task groups guarantee all tasks cancelled/terminated upon join()
        finally:
            while self._running:
                task = self._running.pop()
                await task.cancel()
            while self._daemonic:
                task = self._daemonic.pop()
                await task.cancel()
            self._joined = True
        return

        Wait for tasks in a task group to terminate according to the
        wait policy set for the group.  
        
Wait for tasks in a task group to terminate according to the
wait policy set for the group.
Wait for tasks in a task group to terminate according to the wait policy set for the group .
async def join(self):
        try:
            if self._wait is None:
                return
            while self._finished or self._running:
                while not self._finished:
                    await self._sema.acquire()
                while self._finished:
                    task = self._finished.popleft()
                    if self.completed is None:
                        if not ((self._wait is object) and (not task.exception) and (task.result is None)):
                            self.completed = task 
                    if task.exception or \
                       (self._wait is any) or \
                       ((self._wait is object) and (task.result is not None)):
                        return
        finally:
            while self._running:
                task = self._running.pop()
                await task.cancel()
            while self._daemonic:
                task = self._daemonic.pop()
                await task.cancel()
            self._joined = True
        return
async def join ( self ) : try : if self . _wait is None : return while self . _finished or self . _running : while not self . _finished : await self . _sema . acquire ( ) while self . _finished : task = self . _finished . popleft ( ) if self . completed is None : if not ( ( self . _wait is object ) and ( not task . exception ) and ( task . result is None ) ) : self . completed = task if task . exception or ( self . _wait is any ) or ( ( self . _wait is object ) and ( task . result is not None ) ) : return finally : while self . _running : task = self . _running . pop ( ) await task . cancel ( ) while self . _daemonic : task = self . _daemonic . pop ( ) await task . cancel ( ) self . _joined = True return
Wait for tasks in a task group to terminate according to the
wait policy set for the group.
Wait for tasks in a task group to terminate according to the wait policy set for the group .
'''
        Wait for tasks in a task group to terminate according to the
        wait policy set for the group.  
        ''' # We wait for no-one. Tasks get cancelled on return. # If nothing is finished, we wait for something to complete # Examine all currently finished tasks # Check if it's the first completed task # For wait=object, the self.completed attribute is the first non-None result # What happens next depends on the wait and error handling policies # Task groups guarantee all tasks cancelled/terminated upon join()
self