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

Remove some dead code #50

Closed
computablee opened this issue Sep 26, 2023 · 0 comments · Fixed by #53
Closed

Remove some dead code #50

computablee opened this issue Sep 26, 2023 · 0 comments · Fixed by #53
Labels
good first issue Good for newcomers hacktoberfest This issue is for Hacktoberfest no-parallel-programming-knowledge-necessary No parallel programming knowledge should be required to complete the issue refactor Refactor or restructure code to better align with good engineering practices
Milestone

Comments

@computablee
Copy link
Owner

computablee commented Sep 26, 2023

We should remove NotInSectionsRegionException and Parallel.__reset_lambda_memory.

NotInSectionsRegionException was used when the DotMP.Parallel.Section construct existed, but this function has been removed as of DotMP v1.4.0 in favor of a new API for sections. Therefore, the NotInSectionsRegionException is no longer needed or used. This is a super easy issue, we should just remove this from the codebase.

Parallel.__reset_lambda_memory was used when testing an old version of Parallel.Critical with a different API which, instead of taking an id parameter, it kept a hash of lambdas passed to it. This version was buggy as hashes of lambda functions are not guaranteed to be the same given identical source, so it was changed. This function can be removed.

Finally, Parallel.critical_lock can be refactored into being a Dictionary<int, object> instead of a Dictionary<int, (int, object)>. This is also legacy from the old Parallel.Critical syntax.

A PR should be a draft until all 3 of these issues are addressed.

@computablee computablee added good first issue Good for newcomers hacktoberfest This issue is for Hacktoberfest no-parallel-programming-knowledge-necessary No parallel programming knowledge should be required to complete the issue labels Sep 26, 2023
@computablee computablee added this to the DotMP v1.4.2 milestone Sep 26, 2023
@computablee computablee changed the title Remove NotInSectionsRegionException Remove some dead code Sep 26, 2023
@computablee computablee added the refactor Refactor or restructure code to better align with good engineering practices label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest This issue is for Hacktoberfest no-parallel-programming-knowledge-necessary No parallel programming knowledge should be required to complete the issue refactor Refactor or restructure code to better align with good engineering practices
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant