Commit a26fca7
authored
Remove sortedcontainers dependency (#2947)
closes #2945
# Rationale for this change
This PR removes the `SortedContainers` dependency. Looking at the
behavior of sorted containers we can simplify the logic for merging
manigests and collecting the results while maintaining identical
behavior.
**What the logic today was doing:**
1. Submit all manifest merge tasks to thread pool (pallelism starts with
executor)
2. Collect futures as they complete using `as_completed()` which is out
of order
3. Store completed futures in a `SortedList` to maintain order by
submission
4. Extract all results from the sorted futures
5. Flatten and return
**What we do now:**
1. Submit all manifest merge tasks to thread pool (pallelism starts with
executor)
2. Iterate through futures in submission order, calling `.result()` on
each
3. Flatten and return
This shows we must collect the results before the next step. So we can
iterate futures directly and call `.result()` in order. This blocks the
main thread until each future completes, but doesn't block worker
threads and they all continue running in parallel.
## Are these changes tested?
All existing tests pass.
## Are there any user-facing changes?
No1 parent 11a2281 commit a26fca7
3 files changed
+1
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | | - | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
| |||
792 | 788 | | |
793 | 789 | | |
794 | 790 | | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
| 791 | + | |
803 | 792 | | |
804 | 793 | | |
805 | 794 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments