Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[👷] Road to v2 🚀 - Refactor DAG Maps to sync.Map and Improve invoke Function Readability #48

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

K4L1Ma
Copy link

@K4L1Ma K4L1Ma commented Nov 29, 2023

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.

@K4L1Ma K4L1Ma changed the title Refactor DAG Maps to sync.Map and Improve invoke Function Readability [👷] Road to v2 🚀 - Refactor DAG Maps to sync.Map and Improve invoke Function Readability Nov 29, 2023
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (97bcede) 82.96% compared to head (2cf81c8) 83.06%.

Files Patch % Lines
virtual_scope.go 91.66% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             v2-🚀      #48      +/-   ##
==========================================
+ Coverage   82.96%   83.06%   +0.10%     
==========================================
  Files          21       21              
  Lines        1438     1453      +15     
==========================================
+ Hits         1193     1207      +14     
- Misses        217      218       +1     
  Partials       28       28              
Flag Coverage Δ
unittests 83.06% <98.98%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samber samber merged commit 0293d70 into samber:v2-🚀 Dec 2, 2023
1 check passed
@samber
Copy link
Owner

samber commented Dec 2, 2023

Thanks for this improvement and above all, for making it more readable. 😁

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.

3 participants