Make host pipeline waits configurable and prewarm pending requests (#1)
Co-authored-by: ZazaJr24 <[email protected]>
This commit is contained in:
1 parent
af8f4c68bf
commit
3b3ab69d5a
3 files changed
+43
-18
No files matched your search
@@ -675,7 +675,7 @@ fn write_atomically(path: &std::path::Path, bytes: &[u8]) -> std::io::Result<()>
|
||||
std::fs::rename(&tmp, path)
|
||||
}
|
||||
|
||||
/// Title pipeline keys drawn or dispatched with (this run and the last).
|
||||
/// Title pipeline keys requested by draws or dispatches (this run and the last).
|
||||
static USED: Mutex<Option<HashSet<String>>> = Mutex::new(None);
|
||||
static USED_CHANGED: AtomicBool = AtomicBool::new(false);
|
||||
|
||||
@@ -693,12 +693,12 @@ fn used() -> std::sync::MutexGuard<'static, Option<HashSet<String>>> {
|
||||
used
|
||||
}
|
||||
|
||||
/// Whether the title pipeline with `key` was drawn with in an earlier run.
|
||||
/// Whether the title pipeline with `key` was requested in this or an earlier run.
|
||||
pub(crate) fn wanted_early(key: &str) -> bool {
|
||||
used().as_ref().is_some_and(|s| s.contains(key))
|
||||
}
|
||||
|
||||
/// The title pipeline with `key` was drawn or dispatched with.
|
||||
/// A draw or dispatch requested the title pipeline with `key`.
|
||||
pub(crate) fn note_used(key: &str) {
|
||||
let mut used = used();
|
||||
let set = used.get_or_insert_with(HashSet::new);
|
||||
|
||||
Reference in new issue
Block a user