1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
U
Z±dIã@sdddlmZddlZdd„Zdd„Zdd„Zd    d
„Zd d „ZGd d„deƒZ    edd„ƒZ
dd„Z dS)é)ÚcontextmanagerNcCs tj|dS)zŽUse as a context manager to create a cancel scope with the given
    absolute deadline.
 
    Args:
      deadline (float): The deadline.
 
    ©Údeadline)ÚtrioZ CancelScoper©rúEd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\trio/_timeouts.pyÚ
move_on_atsrcCs |dkrtdƒ‚tt ¡|ƒS)zÑUse as a context manager to create a cancel scope whose deadline is
    set to now + *seconds*.
 
    Args:
      seconds (float): The timeout.
 
    Raises:
      ValueError: if timeout is less than zero.
 
    rútimeout must be non-negative)Ú
ValueErrorrrÚ current_time©ÚsecondsrrrÚ move_on_afters rcÃstj dd„¡IdHdS)z}Pause execution of the current task forever (or until cancelled).
 
    Equivalent to calling ``await sleep(math.inf)``.
 
    cSs
tjjjS)N)rÚlowlevelZAbortZ    SUCCEEDED)Ú_rrrÚ<lambda>(ózsleep_forever.<locals>.<lambda>N)rrZwait_task_rescheduledrrrrÚ sleep_forever"src    Ãs$t|ƒtƒIdHW5QRXdS)aäPause execution of the current task until the given time.
 
    The difference between :func:`sleep` and :func:`sleep_until` is that the
    former takes a relative time and the latter takes an absolute time
    according to Trio's internal clock (as returned by :func:`current_time`).
 
    Args:
        deadline (float): The time at which we should wake up again. May be in
            the past, in which case this function executes a checkpoint but
            does not block.
 
    N)rrrrrrÚ sleep_until+s
rcÃsD|dkrtdƒ‚|dkr*tj ¡IdHntt ¡|ƒIdHdS)aPause execution of the current task for the given number of seconds.
 
    Args:
        seconds (float): The number of seconds to sleep. May be zero to
            insert a checkpoint without actually blocking.
 
    Raises:
        ValueError: if *seconds* is negative.
 
    rzduration must be non-negativeN)r
rrÚ
checkpointrr r rrrÚsleep<s
rc@seZdZdZdS)Ú TooSlowErrorzRRaised by :func:`fail_after` and :func:`fail_at` if the timeout
    expires.
 
    N)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrrrrOsrc    cs(t|ƒ }|VW5QRX|jr$t‚dS)a´Creates a cancel scope with the given deadline, and raises an error if it
    is actually cancelled.
 
    This function and :func:`move_on_at` are similar in that both create a
    cancel scope with a given absolute deadline, and if the deadline expires
    then both will cause :exc:`Cancelled` to be raised within the scope. The
    difference is that when the :exc:`Cancelled` exception reaches
    :func:`move_on_at`, it's caught and discarded. When it reaches
    :func:`fail_at`, then it's caught and :exc:`TooSlowError` is raised in its
    place.
 
    Raises:
      TooSlowError: if a :exc:`Cancelled` exception is raised in this scope
        and caught by the context manager.
 
    N)rZcancelled_caughtr)rZscoperrrÚfail_atVs
rcCs |dkrtdƒ‚tt ¡|ƒS)aßCreates a cancel scope with the given timeout, and raises an error if
    it is actually cancelled.
 
    This function and :func:`move_on_after` are similar in that both create a
    cancel scope with a given timeout, and if the timeout expires then both
    will cause :exc:`Cancelled` to be raised within the scope. The difference
    is that when the :exc:`Cancelled` exception reaches :func:`move_on_after`,
    it's caught and discarded. When it reaches :func:`fail_after`, then it's
    caught and :exc:`TooSlowError` is raised in its place.
 
    Raises:
      TooSlowError: if a :exc:`Cancelled` exception is raised in this scope
        and caught by the context manager.
      ValueError: if *seconds* is less than zero.
 
    rr    )r
rrr r rrrÚ
fail_afterosr) Ú
contextlibrrrrrrrÚ    ExceptionrrrrrrrÚ<module>s