plumpy.greenback_bridge module#
Async/sync bridge for plumpy, built on greenback.
This module is the sole interface to greenback within the plumpy/aiida ecosystem. All greenback usage should go through these wrappers so that the underlying library remains an implementation detail of plumpy.
- async plumpy.greenback_bridge.ensure_portal() None[source]#
Ensure a greenback portal is active on the current asyncio task (no-op if one exists).
- plumpy.greenback_bridge.has_portal() bool[source]#
Return True if
sync_await()can be called in the current context.
- plumpy.greenback_bridge.run_until_complete(loop: AbstractEventLoop, awaitable: Awaitable[_T]) _T[source]#
Run awaitable to completion, even if the event loop is already running.