Skip to content

docs: document AsyncPipeline task cancellation and sync streaming callbacks#11870

Draft
julian-risch wants to merge 2 commits into
v3from
docs/v3-simple-doc-updates
Draft

docs: document AsyncPipeline task cancellation and sync streaming callbacks#11870
julian-risch wants to merge 2 commits into
v3from
docs/v3-simple-doc-updates

Conversation

@julian-risch

@julian-risch julian-risch commented Jul 5, 2026

Copy link
Copy Markdown
Member

Related Issues

  • Resolves two subtasks of deepset-ai/haystack-private#381 (documentation updates needed for Haystack 3.0)

Proposed Changes:

Documents two of the smallest subtasks of the tracking issue, ranked by effort:

  • fix: In AsyncPipeline cancel inflight tasks if a PipelineRuntimeError is raised by another component #11499AsyncPipeline docs: new "Error Handling and Task Cancellation" section explaining that in-flight tasks are cancelled and drained when a component raises, when run_async_generator iteration is abandoned, or when the run is cancelled — plus the caveat that sync components offloaded to a worker thread run to completion with their outputs discarded.
  • refactor: accept sync callbacks in run_async #11466 — Streaming docs: new "Sync and Async Callbacks" section in the Choosing the Right Generator guide (with a runnable example) explaining that sync streaming_callbacks are now accepted in async contexts with a logged warning, while async callbacks in sync run still raise. Cross-linked from the AsyncPipeline page.

Note: this PR originally also carried the SearchableToolset duplicate-name note (#11549). That change was moved to #11873, which contains all other SearchableToolset docs updates, so the two PRs no longer conflict on the same file.

How did you test it?

npm run build in docs-website/ passes (also catches broken links). The sync-callback behavior (streaming proceeds, warning logged) was executed against the v3 code with an offline generator.

Notes for the reviewer

Draft PR targeting v3. Content is based on the release notes of the two code PRs.

Checklist

🤖 Generated with Claude Code

…cks in run_async, and SearchableToolset duplicate-name check

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
haystack-docs Ready Ready Preview, Comment Jul 5, 2026 8:39pm

Request Review

…he other SearchableToolset docs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@julian-risch julian-risch changed the title docs: document AsyncPipeline task cancellation, sync streaming callbacks, and SearchableToolset duplicate-name check docs: document AsyncPipeline task cancellation and sync streaming callbacks Jul 5, 2026
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.

1 participant