langgraph_agent_toolkit.service.blocking module

Bound synchronous feedback calls that can outlive their HTTP requests.

class langgraph_agent_toolkit.service.blocking.BoundedBlockingExecutor(capacity)[source][source]

Bases: object

Keep thread capacity reserved until each synchronous call finishes.

Use one instance on the service event loop. The executor has no queue. Cancellation stops the caller’s wait. It cannot stop synchronous code.

Parameters:

capacity (int)

__init__(capacity)[source][source]
Parameters:

capacity (int)

async run(function, *args, **kwargs)[source][source]

Run one synchronous call if a thread slot is available.

Parameters:
  • function (Callable[[...], _Result])

  • args (Any)

  • kwargs (Any)

Return type:

_Result

async aclose(timeout)[source][source]

Stop accepting calls and wait up to the shutdown time limit.

Parameters:

timeout (float)

Return type:

None