Heaps' records copied as bytes: pages read, compared and sorted out on several threads, empty slots that show nothing left alone; pages of places read by steps on the card asked about once
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2547124475
commit
ee481c02fb
4 files changed
+195
-115
No files matched your search
@@ -340,7 +340,7 @@ pub(crate) fn each_under(count: usize, f: &(dyn Fn(usize) + Sync)) {
|
||||
}
|
||||
|
||||
/// Calls `f` with every number below `count`, on this thread and on threads
|
||||
/// kept for making descriptors (`VICTORY_VIEW_THREADS`, 4 with this one; 1:
|
||||
/// kept for making descriptors (`VICTORY_VIEW_THREADS`, 4 with this one, 6 for records; 1:
|
||||
/// on this one alone). Those for `records`, the heaps' records copied as
|
||||
/// bytes, are others than those for the views picked by index: submissions
|
||||
/// wait for the first, lists for the second, and each kept the other waiting.
|
||||
@@ -348,7 +348,7 @@ pub(crate) fn each_view(records: bool, count: usize, f: &(dyn Fn(usize) + Sync))
|
||||
static POOLS: [OnceLock<&'static Pool>; 2] = [const { OnceLock::new() }; 2];
|
||||
POOLS[usize::from(records)]
|
||||
.get_or_init(|| {
|
||||
let threads = std::env::var("VICTORY_VIEW_THREADS").ok().and_then(|v| v.trim().parse().ok()).unwrap_or(4usize);
|
||||
let threads = std::env::var("VICTORY_VIEW_THREADS").ok().and_then(|v| v.trim().parse().ok()).unwrap_or(if records { 6usize } else { 4 });
|
||||
Pool::new(if records { "victory-records" } else { "victory-views" }, threads.clamp(1, 16))
|
||||
})
|
||||
.each(count, f);
|
||||
|
||||
Reference in new issue
Block a user