+
    wiY                     N    R t ^ RIHtHtHt ^ RIt^ RIHt ^ RIH	t	 RR R llt
R# )u   
Shared polling utilities for task operations.

This module provides generic polling logic that works for both client→server
and server→client task polling.

WARNING: These APIs are experimental and may change without notice.
)AsyncIterator	AwaitableCallableN)is_terminal)GetTaskResultc          	          V ^8  d   QhR\         \        .\        \        ,          3,          R\        R\        R\
        \        ,          /# )   get_tasktask_iddefault_interval_msreturn)r   strr   r   intr   )formats   "Y/home/ubuntu/.local/lib/python3.14/site-packages/mcp/shared/experimental/tasks/polling.py__annotate__r      sF     . .ui667.. . =!	.    c                  "    V ! V4      G Rj  xL
 pV5x  \        VP                  4      '       d   R# VP                  e   VP                  MTp\        P                  ! VR,          4      G Rj  xL
  Kv   Li L5i)u  
Poll a task until it reaches terminal status.

This is a generic utility that works for both client→server and server→client
polling. The caller provides the get_task function appropriate for their direction.

Args:
    get_task: Async function that takes task_id and returns GetTaskResult
    task_id: The task to poll
    default_interval_ms: Fallback poll interval if server doesn't specify

Yields:
    GetTaskResult for each poll
Ni  )r   statuspollIntervalanyiosleep)r	   r
   r   r   interval_mss   &&&  r   poll_until_terminalr      sh     & ((v}}%%-3-@-@-Lf))Rekk+,--- ) 	.s"   A=A9A"A=2A;3A=;A=)i  )__doc__collections.abcr   r   r   r   %mcp.shared.experimental.tasks.helpersr   	mcp.typesr   r    r   r   <module>r      s%    ? >  = #. .r   