scaibu_mutex_lock 1.0.10
scaibu_mutex_lock: ^1.0.10 copied to clipboard
A Dart package for mutex locking, ensuring safe and efficient synchronization. Supports atomic ops, deadlock prevention, and lightweight resource locking.
Changelog #
1.0.0 - 2025-03-14 #
Added #
- Initial release with mutex locking mechanisms.
- Implements Circuit Breaker Mutex, Read-Write Lock, Priority Mutex, and Resource Pool.
- Supports atomic execution and isolate-based execution for concurrency management.
- Includes event queue and awaiting stream utilities.
1.0.5 - 2025-03-22 #
Added #
- Example usage in example/lib/circuit_breaker_example.dart to demonstrate how to use the CircuitBreakerMutex class.
- Unit tests for CircuitBreakerMutex to ensure reliability and correctness.
Fixed #
- Resolved a bug related to improper state handling in CircuitBreakerMutex that caused incorrect circuit reset behavior.
1.0.7 - 2025-03-30 #
Added #
- Implemented
StorageEngineBlocfor managing data operations using BLoC. - Added support for fetching, saving, deleting, and querying stored items with typed generics (
T extends StorableModel). - Introduced event-driven architecture with event handling for:
- Loading single and multiple items (
LoadItem,LoadItems). - Saving single and multiple items (
SaveItem,SaveItems). - Deleting items based on ID, multiple IDs, or conditions (
DeleteItem,DeleteItems,DeleteWhere). - Streaming real-time updates for stored data (
WatchItem,WatchItems,WatchFilteredItems). - Querying stored items based on filter conditions (
QueryItems). - Managing raw data (
SetRawData,GetRawData,WatchRawData). - Clearing storage under a specific tag (
ClearStorage).
- Loading single and multiple items (
Fixed #
- Addressed potential memory leaks by ensuring all stream subscriptions are properly canceled and cleared.
1.0.9 - 2025-04-06 #
Fixed #
- Ensured correct cancellation and cleanup of stream subscriptions in
WatchItem<T>event to prevent memory leaks and duplicate listeners. - Added conditional checks to avoid BLoC method calls (
add(...)) after closure, preventing potential runtime exceptions. - Improved internal
_subscriptionsmap management by consistently removing canceled entries.
1.0.10 - 2025-10-01 #
Added #
-
Searching utilities under
lib/service/searching/find_all_duplicates.dartfind_all_peak_elements.dartfind_any_peak_element.dartfind_elements_repeated_exactly_k_times.dartfind_element_with_max_frequency.dartfind_first_duplicate_by_index.dartfind_kth_largest.dartfind_k_th_smallest.dartfind_largest_in_rotated_sorted_array.dartfind_majority_elements.dartfind_minimum_in_rotated_sorted_array.dartfind_missing_element.dartfind_single_unique.dartfind_smallest_element.dartfind_unique_among_repeats.darthas_duplicates.dartfind_largest_element.dart
-
Storage layer enhancements
- Added
app_storage.dartfor generic storage handling. - Introduced
storage_engine.dartwith BLoC pattern support. - Added
storageEngine/sub-module with:storage_engine_bloc.dartstorage_engine_event.dartstorage_engine_state.dart
- Added
-
TreeCraft repository
- Introduced
tree_repository/for tree-based data structures. - Added
tree_mappable.dartundermodel/. - Added
generic_tree_node.dartunderservice/.
- Introduced
Changed #
- Reorganized
lib/structure:- Core mutex handling in
core/mutex_service.dart - Lock implementations moved to
src/lock/ - Mutex implementations moved to
src/mutex/ - Async utilities under
src/stream/ - Shared resources under
src/utils/
- Core mutex handling in
- Ensured
scaibu_mutex_lock.dartacts as a clean public API entrypoint.
Deprecated #
lib/main.dartkept temporarily for compatibility but scheduled for removal.lib/example/lib/main.dart(will be migrated to top-levelexample/folder in future release).
Fixed #
- Improved internal naming consistency (
transaction_mutex.dartinstead ofmutex_transaction.dart). - Resolved deep nesting in earlier
treeCraftandmutexLockdirectories.