#NEWLINE# def wait( timeout = None ) : #NEWLINE# #INDENT# '\n    Wait for all asynchronous callbacks to return, and return a list of those\n    values. If a *timeout* is provide, wait up to that many seconds for the\n    callbacks to return before raising a TimeoutError containing a list of\n    the results that *did* complete.\n    ' #NEWLINE# request = Application . current_app . request #NEWLINE# ( top , request . _unhandled ) = ( _WaitList ( request . _unhandled ) , [ ] ) #NEWLINE# top . timeout = timeout #NEWLINE# return top