Skip to content

Feature/concurrency#9

Merged
PlugFox merged 20 commits intomasterfrom
feature/concurrency
Feb 6, 2026
Merged

Feature/concurrency#9
PlugFox merged 20 commits intomasterfrom
feature/concurrency

Conversation

@PlugFox
Copy link
Owner

@PlugFox PlugFox commented Feb 6, 2026

No description provided.

- Introduced Mutex-based synchronization in SequentialControllerHandler to ensure sequential execution of operations.
- Removed the custom event queue implementation, simplifying the concurrency model.
- Updated Controller class to track processing calls and provide a clearer isProcessing state.
- Enhanced error handling and completion tracking in the handle method of Controller.
- Updated tests to reflect changes in concurrency behavior and ensure proper functionality across sequential, droppable, and concurrent controllers.
…concurrency strategies, update documentation, and adjust migration guides accordingly
@PlugFox PlugFox requested a review from Copilot February 6, 2026 07:20
@PlugFox PlugFox self-assigned this Feb 6, 2026
@PlugFox PlugFox added the enhancement New feature or request label Feb 6, 2026
@PlugFox PlugFox added this to PlugFox Feb 6, 2026
@github-project-automation github-project-automation bot moved this to 📋 Backlog in PlugFox Feb 6, 2026
Copy link

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 pull request introduces a major architectural refactor for version 1.0.0-dev.1, simplifying concurrency handling in the Control state management library. The changes focus on making the library more flexible and easier to use by removing restrictive modifiers and providing a default concurrent implementation in the base Controller class.

Changes:

  • Removed base modifiers from Controller, StateController, and concurrency handler mixins for more flexibility
  • Added default concurrent handle() implementation with generic return values (Future<T?>)
  • Simplified concurrency handler mixins to use Mutex internally (reduced from ~300 to ~90 lines)
  • Introduced Mutex as a core primitive for custom concurrency control
  • Deprecated ConcurrentControllerHandler (now redundant)
  • Updated dependencies and added comprehensive documentation (README, MIGRATION.md, IDEAS.md)

Reviewed changes

Copilot reviewed 41 out of 45 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/src/controller.dart Added default concurrent handle() implementation with generic return values, error/done callbacks, and zone-based error catching
lib/src/mutex.dart New public API for Mutex synchronization primitive
lib/src/util/linked_mutex.dart Linked-list based Mutex implementation using completers
lib/src/concurrency/*.dart Simplified mixins to wrap super.handle() with Mutex
lib/src/state_controller.dart Minor formatting and removed base modifier
lib/src/registry.dart Removed (no longer needed)
test/unit/mutex_test.dart Comprehensive new test suite (1137 lines)
test/unit/state_controller_test.dart Added tests for generic handle and updated for new behavior
pubspec.yaml Version bump and dependency updates
example/lib/main.dart Updated to demonstrate new API with callbacks and return values
README.md Extensive documentation improvements with examples
MIGRATION.md Comprehensive migration guide from 0.x to 1.0.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@PlugFox PlugFox merged commit 685a9bc into master Feb 6, 2026
3 checks passed
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in PlugFox Feb 6, 2026
@PlugFox PlugFox deleted the feature/concurrency branch February 6, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant