Add concurrent workflow execution capabilities#4
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces concurrent workflow execution capabilities to Cano, allowing multiple workflow instances to run in parallel with configurable completion strategies. The implementation enhances the scheduler with support for both regular and concurrent workflows while maintaining API consistency.
Key Changes
- Added
ConcurrentWorkflowtype with flexible timeout strategies (WaitForever, WaitForQuota, WaitDuration, WaitQuotaOrDuration) - Enhanced the scheduler to support both regular and concurrent workflows with detailed status tracking
- Added comprehensive examples demonstrating concurrent workflows and SIMD matrix processing pipelines
Reviewed Changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/workflow.rs | Adds concurrent workflow types, wait strategies, status tracking, and execution logic |
| src/scheduler.rs | Enhances scheduler to support concurrent workflows alongside regular ones |
| src/lib.rs | Updates public API exports to include concurrent workflow types |
| examples/workflow_*.rs | Removes redundant type annotations following type inference improvements |
| examples/workflow_concurrent.rs | New example demonstrating concurrent workflow execution patterns |
| examples/workflow_simd_matrix_pipeline.rs | New SIMD-accelerated matrix processing pipeline example |
| examples/scheduler_*.rs | Updated examples showcasing mixed workflow types and scheduling patterns |
| benches/workflow_performance.rs | Enhanced benchmarks for concurrent vs sequential execution performance testing |
Comments suppressed due to low confidence (1)
src/scheduler.rs:613
- The comment mentions handling tasks that were still running, but the implementation simply marks all workflows as cancelled. The comment should be updated to accurately reflect the current behavior or the implementation should be improved to handle running tasks properly.
{
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
[nitpick] The WaitForever strategy has duplicated error handling logic for task join errors. Consider extracting this into a helper function to reduce code duplication across all wait strategies.
210ff0e to
addbf85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces concurrent workflow execution functionality to Cano, allowing multiple workflow instances to run in parallel with configurable completion strategies. Key additions include:
ConcurrentWorkflowtype with flexible timeout strategies (WaitForever, WaitForQuota, WaitDuration, WaitQuotaOrDuration)