-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asyncio Python API - Request For Comment #3
Comments
I prefer to choose Option B |
I have a version of it that already works. It depends on python Async functions not monopolizing or holding up the event loop, by not doing any long blocking operations on the main thread, which most python async code today already does. Also any code in python that is blocking more than a few microseconds, should be wrapped inside |
For Option B, The Shall I go ahead and make a PR based on this? @codehz |
seems ok @heri16 |
Would like to add
asyncio
support to bun_python.Before I submit the PR, would like to get some thoughts on which API is preferable:
Option A:
Option A has an
asyncio()
function to wrap Py Coroutines or Pyasyncio.Task
into an awaitable JS Promise.Option B:
Option B adds a
then()
method to all PyObject proxy to make them awaitable.@codehz
The text was updated successfully, but these errors were encountered: