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.
We should remove
NotInSectionsRegionException
andParallel.__reset_lambda_memory
.NotInSectionsRegionException
was used when theDotMP.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, theNotInSectionsRegionException
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 ofParallel.Critical
with a different API which, instead of taking anid
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 aDictionary<int, object>
instead of aDictionary<int, (int, object)>
. This is also legacy from the oldParallel.Critical
syntax.A PR should be a draft until all 3 of these issues are addressed.