parallel #8736

Closed
opened 2026-02-21 18:27:18 -05:00 by yindo · 2 comments
Owner

Originally created by @zbximo on GitHub (Feb 28, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.14.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I run two large models in parallel, how can I ensure that they both complete their respective outputs before proceeding with further processing

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @zbximo on GitHub (Feb 28, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.14.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I run two large models in parallel, how can I ensure that they both complete their respective outputs before proceeding with further processing ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🙋‍♂️ question label 2026-02-21 18:27:18 -05:00
yindo closed this issue 2026-02-21 18:27:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 28, 2025):

@zbximo Hello there! I'm here to help you with bug reports, answer questions, and guide you on becoming a contributor. Let's work together to solve the issue you're facing.

To ensure that both large models complete their respective outputs before proceeding with further processing in Dify, you can utilize the GraphEngine and its parallel execution capabilities. Dify manages task dependencies and ensures that all tasks are completed before proceeding by using a thread pool to run nodes in parallel and waiting for all parallel branches to finish. This is achieved through the _run_parallel_branches method, which submits tasks to the thread pool and waits for their completion using a queue to collect results and a wait function to ensure all threads have finished [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Feb 28, 2025): <!-- Greeting --> @zbximo Hello there! I'm here to help you with bug reports, answer questions, and guide you on becoming a contributor. Let's work together to solve the issue you're facing. <!-- Answer --> To ensure that both large models complete their respective outputs before proceeding with further processing in Dify, you can utilize the `GraphEngine` and its parallel execution capabilities. Dify manages task dependencies and ensures that all tasks are completed before proceeding by using a thread pool to run nodes in parallel and waiting for all parallel branches to finish. This is achieved through the `_run_parallel_branches` method, which submits tasks to the thread pool and waits for their completion using a queue to collect results and a `wait` function to ensure all threads have finished <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/graph_engine/graph_engine.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/c371feb2-b4b0-4ca6-95b1-b962b603fa49?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/c371feb2-b4b0-4ca6-95b1-b962b603fa49?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/c371feb2-b4b0-4ca6-95b1-b962b603fa49?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/c371feb2-b4b0-4ca6-95b1-b962b603fa49?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c371feb2-b4b0-4ca6-95b1-b962b603fa49?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/c371feb2-b4b0-4ca6-95b1-b962b603fa49?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c371feb2-b4b0-4ca6-95b1-b962b603fa49?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Feb 28, 2025):

This is only for bug report, if you would like to ask a question, please head to Discussions.

@crazywoola commented on GitHub (Feb 28, 2025): This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8736