warn parallel

This commit is contained in:
zachary62 2025-01-28 16:51:54 +00:00
parent c72c6aff61
commit 1d2e3c5090
1 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,11 @@ parallel_flow = SummarizeMultipleFiles(start=sub_flow)
await parallel_flow.run_async(shared)
```
> Because of Pythons GIL, parallel nodes and flows cant truly parallelize CPU-bound tasks (e.g., heavy numerical computations).
>
> However, they excel at overlapping I/O-bound work—like LLM calls, database queries, API requests, or file I/O.
{: .warning }
## Best Practices
- **Ensure Tasks Are Independent**: If each item depends on the output of a previous item, **do not** parallelize.