Skip to content
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

Better Asyncio support #19

Open
wiwichips opened this issue Aug 6, 2024 · 1 comment
Open

Better Asyncio support #19

wiwichips opened this issue Aug 6, 2024 · 1 comment
Assignees

Comments

@wiwichips
Copy link
Collaborator

wiwichips commented Aug 6, 2024

We support asyncio and have an async api, but to provide the best experience possible for our api consumers, we should make an effort to ensure they use the same event loop between multiple calls to work well with PythonMonkey's event loop

Note, application developers should never have to worry about the event loop - see docs here:

Application developers should typically use the high-level asyncio functions, such as asyncio.run(), and should rarely need to reference the loop object or call its methods. This section is intended mostly for authors of lower-level code, libraries, and frameworks, who need finer control over the event loop behavior.

maybe run


import nest_asyncio
nest_asyncio.apply()

if we have top level awwait

@wiwichips wiwichips self-assigned this Aug 6, 2024
@wiwichips
Copy link
Collaborator Author

I don't fully understand, what are the problems with it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant