def get_first_result(threads):
    """ this blocks, waiting for the first result that returns from a thread
    :type threads: list[Thread]
    """
    while True:
        for thread in threads:
            if not thread.is_alive():
                return thread.queue.get()
def get_first_result ( threads ) : while True : for thread in threads : if not thread . is_alive ( ) : return thread . queue . get ( )
this blocks, waiting for the first result that returns from a thread
    :type threads: list[Thread]