async_helpers#

besser.agent.library.coroutine.async_helpers.sync_coro_call(coro)[source]#

Executes an asynchronous coroutine synchronously.

This function runs the given coroutine in a separate thread with its own event loop, allowing synchronous code to await the result of an async function.

Parameters:

coro (coroutine) – The asynchronous coroutine to execute.

Returns:

The result of the coroutine execution.

Return type:

Any