Files
crewAI/lib/crewai/tests
Devin AI 3702a47bfe feat: add graceful cancellation support (aclose/cancel) for streaming outputs
Implements aclose() and cancel() methods on CrewStreamingOutput and
FlowStreamingOutput to allow callers to abort in-flight streaming and
release resources promptly (e.g. when an HTTP client disconnects).

- Add aclose() async method for async streaming contexts
- Add cancel() sync method for sync streaming contexts
- Add is_cancelled property to check cancellation state
- Update create_async_chunk_generator to support cancel events
- Update create_chunk_generator to support cancel thread events
- Add comprehensive tests for cancellation scenarios

Closes #5312

Co-Authored-By: João <joao@crewai.com>
2026-04-07 09:39:51 +00:00
..
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2025-10-20 14:10:19 -07:00
2026-03-24 19:03:35 +08:00
2026-02-13 21:34:37 -03:00
2025-12-04 13:34:29 -08:00
2025-10-20 14:10:19 -07:00
2025-12-01 18:56:56 -05:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00