Skip to content

Add concurrent workflow execution capabilities#4

Merged
nassor merged 10 commits intomainfrom
feature/concurrent-workflow
Jul 29, 2025
Merged

Add concurrent workflow execution capabilities#4
nassor merged 10 commits intomainfrom
feature/concurrent-workflow

Conversation

@nassor
Copy link
Copy Markdown
Owner

@nassor nassor commented Jul 29, 2025

This PR introduces concurrent workflow execution functionality to Cano, allowing multiple workflow instances to run in parallel with configurable completion strategies. Key additions include:

  • New ConcurrentWorkflow type with flexible timeout strategies (WaitForever, WaitForQuota, WaitDuration, WaitQuotaOrDuration)
  • Enhanced monitoring with detailed status tracking for concurrent executions
  • Simplified scheduler API with cleaner workflow registration
  • New examples demonstrating concurrent workflows and SIMD matrix processing pipeline
  • Updated benchmarks for performance testing of concurrent vs sequential execution
  • Dependency updates, including tokio version bump

Copilot AI review requested due to automatic review settings July 29, 2025 03:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ConcurrentWorkflow type 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.
{

Comment thread src/workflow.rs Outdated
Comment thread src/workflow.rs Outdated
Comment thread src/workflow.rs
}
}
}
}
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copilot uses AI. Check for mistakes.
@nassor nassor force-pushed the feature/concurrent-workflow branch from 210ff0e to addbf85 Compare July 29, 2025 03:20
@nassor nassor merged commit 7db0cfd into main Jul 29, 2025
4 checks passed
@nassor nassor deleted the feature/concurrent-workflow branch July 31, 2025 20:41
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.

2 participants