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

Method _block

tools/python-3.11.9-amd64/Lib/asyncio/locks.py:504–518  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

502 self._exit()
503
504 async def _block(self):
505 # Block until the barrier is ready for us,
506 # or raise an exception if it is broken.
507 #
508 # It is draining or resetting, wait until done
509 # unless a CancelledError occurs
510 await self._cond.wait_for(
511 lambda: self._state not in (
512 _BarrierState.DRAINING, _BarrierState.RESETTING
513 )
514 )
515
516 # see if the barrier is in a broken state
517 if self._state is _BarrierState.BROKEN:
518 raise exceptions.BrokenBarrierError("Barrier aborted")
519
520 async def _release(self):
521 # Release the tasks waiting in the barrier.

Callers 1

waitMethod · 0.95

Calls 1

wait_forMethod · 0.45

Tested by

no test coverage detected