You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because nbclient's code is natively asynchronous, we provide wrappers to run async code synchronously for its blocking API. We currently use nest-asyncio to run coroutines until they complete in the current event loop (here). While this works well most of the time, it also comes with limitations, because nest-asyncio patches asyncio's code. I don't think it would work if someone decided to use uvloop for instance.
One alternative is to run coroutines in an event loop running in another thread. @SylvainCorlay experimented with it in #113, and fsspec also uses this approach here. I think we should provide a way to choose between nest-asyncio and the threading solution.
The text was updated successfully, but these errors were encountered:
Because nbclient's code is natively asynchronous, we provide wrappers to run async code synchronously for its blocking API. We currently use nest-asyncio to run coroutines until they complete in the current event loop (here). While this works well most of the time, it also comes with limitations, because nest-asyncio patches asyncio's code. I don't think it would work if someone decided to use uvloop for instance.
One alternative is to run coroutines in an event loop running in another thread. @SylvainCorlay experimented with it in #113, and fsspec also uses this approach here. I think we should provide a way to choose between nest-asyncio and the threading solution.
The text was updated successfully, but these errors were encountered: