On this page
  1. asyncio.BrokenBarrierError
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

asyncio.BrokenBarrierError

Prev: asyncio.BoundedSemaphore | Up: asyncio | Next: asyncio.BufferedProtocol
Rel: asyncio.AbstractEventLoop, asyncio.AbstractServer, asyncio.all_tasks, asyncio.as_completed
Ref: docs.python.org โ€” asyncio.BrokenBarrierError
Tags: #public #python3 #stdlib #asyncio


Import

import asyncio
from asyncio import BrokenBarrierError

Signature & Overview

asyncio.BrokenBarrierError(...)

Barrier is broken by barrier.abort() call.

Methods & Attributes

Usage

import asyncio

async def main():
    b = asyncio.Barrier(2)
    await b.abort()
    try:
        await b.wait()
    except asyncio.BrokenBarrierError:
        assert b.broken is True

asyncio.run(main())

Gotchas

REPL Inspect

from asyncio import BrokenBarrierError
help(BrokenBarrierError)

Linked from

Related notes