Toggle Menu
Prev Up Next

# `langchain_core.runnables.utils`.gated_coro

async langchain_core.runnables.utils.gated_coro(semaphore: Semaphore, coro: Coroutine) → Any

  Run a coroutine with a semaphore. :param semaphore: The semaphore to use. :param coro: The coroutine to run.

  Returns

    The result of the coroutine.

  Parameters

    - semaphore (Semaphore) –

    - coro (Coroutine) –

  Return type

    Any