MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / wait

Method wait

tools/python-3.11.9-amd64/Lib/threading.py:611–630  ·  view source on GitHub ↗

Block until the internal flag is true. If the internal flag is true on entry, return immediately. Otherwise, block until another thread calls set() to set the flag to true, or until the optional timeout occurs. When the timeout argument is present and not None

(self, timeout=None)

Source from the content-addressed store, hash-verified

609 self._flag = False
610
611 def wait(self, timeout=None):
612 """Block until the internal flag is true.
613
614 If the internal flag is true on entry, return immediately. Otherwise,
615 block until another thread calls set() to set the flag to true, or until
616 the optional timeout occurs.
617
618 When the timeout argument is present and not None, it should be a
619 floating point number specifying a timeout for the operation in seconds
620 (or fractions thereof).
621
622 This method returns the internal flag on exit, so it will always return
623 True except if a timeout is given and the operation times out.
624
625 """
626 with self._cond:
627 signaled = self._flag
628 if not signaled:
629 signaled = self._cond.wait(timeout)
630 return signaled
631
632
633# A barrier class. Inspired in part by the pthread_barrier_* api and

Callers 10

shutdownMethod · 0.45
closeMethod · 0.45
acquireMethod · 0.45
_enterMethod · 0.45
startMethod · 0.45
runMethod · 0.45
shutdownMethod · 0.45
joinMethod · 0.45
putMethod · 0.45
getMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected