-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Averaging slight adjustement for ensured thread safety (#810)
* Refactor for thread safety and performance - Import `System.Collections.Concurrent` for concurrent collections. - Change `averagedPeaks` from `List` to `ConcurrentBag` for thread safety. - Move `binIncidences` array creation outside parallel loop to avoid redundancy. - Modify `Parallel.ForEach` loop to use array length instead of list count. - Remove `lock` around `averagedPeaks.Add` as `ConcurrentBag` is thread-safe. * Test Project cleanup * used a partitioner * Oopsie * Removed bag as it was an unnecessry structure
- Loading branch information
Showing
9 changed files
with
19 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.