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

Async version of feed_async_iterable #986

Open
kevinhu opened this issue Dec 10, 2024 · 0 comments
Open

Async version of feed_async_iterable #986

kevinhu opened this issue Dec 10, 2024 · 0 comments
Assignees
Milestone

Comments

@kevinhu
Copy link
Contributor

kevinhu commented Dec 10, 2024

Despite making async calls, Vespa.feed_async_iterable is itself a synchronous method.

When using Vespa inside an asynchronous context such as a web server, this runs into the classic RuntimeError: asyncio.run() cannot be called from a running event loop error because feed_async_iterable defines a run() wrapper that's passed to asyncio.run to make the method synchronous. As a result, it's tricky to run parallel operations without organizing the tasks yourself.

A possible solution is to give VespaAsync it's own feed_async_iterable method.

@oyving oyving added this to the soon milestone Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants