a c@sddlZddlZddlZddlZddlZejdkr@ddlmZn ddlmZedZ edZ ej ej e fddddZej e e fe je je d d d ZGd d d eZeje e dddZeje eje dddZdS)N) ) ParamSpecTP)argsreturnc stdtt4IdH^tjgtjfddfdd }|D]"\}}|t j |fi|qBWdIdHq1IdHs0YdS)NzOrun_until_first_complete is deprecated and will be removed in a future version.)funcrcs|IdHjdSN)Z cancel_scopecancel)r Z task_groupb/workspaces/shunt/resources/test-fastapi/venv/lib/python3.9/site-packages/starlette/concurrency.pyruns z%run_until_first_complete..run) warningswarnDeprecationWarninganyioZcreate_task_grouptypingCallable CoroutineZ start_soon functoolspartial)rrr kwargsr r rrun_until_first_completes  r)r rrrcs0|rtj|fi|}tjj|g|RIdHSr )rrr to_threadrun_sync)r rrr r rrun_in_threadpool#src@s eZdZdS)_StopIterationN)__name__ __module__ __qualname__r r r rr,sr)iteratorrcCs&z t|WSty tYn0dSr )next StopIterationrr"r r r_next0s  r&cCs8ztjt|IdHVWqty0Yq4Yq0qdSr )rrrr&rr%r r riterate_in_threadpool:s r')rsysrrr version_inforZtyping_extensionsTypeVarrrTuplerdictrrrr ExceptionrIteratorr& AsyncIteratorr'r r r rs$