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

Return results as soon as we have them #39

Draft
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

sirbrillig
Copy link
Owner

@sirbrillig sirbrillig commented Mar 23, 2025

Fixes #38

This PR adds a new API (the functions search_and_format_callback and search_callback) that return nothing and instead operate via callbacks; the result callback is called for each result and the error callback is called for each error. This should make for a much simpler consumer API in most cases.

To do

  • Make this optional based on config? Maybe it doesn't matter.
  • Document the new API.
  • Add tests for new API.
  • Refactor non-callback search to use new API? It seems flexible enough to do that without needing a mutex.

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

Successfully merging this pull request may close these issues.

Allow printing results async
1 participant