-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels