[👷] Road to v2 🚀 - Refactor DAG Maps to sync.Map and Improve invoke Function Readability #48
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 improvements to the codebase by replacing certain maps and mutexes with sync.Map for enhanced concurrency safety. Additionally, modifications have been made to the invoke function to improve its readability, making the code more comprehensible.
Relates to #45
Changes:
Utilization of sync.Map:
Replaced existing maps and mutexes with sync.Map for improved concurrency handling.
This enhances the safety and efficiency of the code, particularly in scenarios involving concurrent access to maps.
Enhanced invoke Function:
Made changes to the invoke function to enhance readability.
Improved the structure and clarity of the code for easier understanding and maintenance.
Purpose:
The goal of these changes is to enhance the overall robustness and clarity of the codebase. The adoption of sync.Map improves concurrent map operations, while the refactoring of the invoke function aims to make the code more legible and maintainable.
Testing:
The changes have been tested to ensure that the refactored code retains its functionality and performs as expected. Unit tests have been executed to validate the correctness of the modifications.