Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/editor/src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,14 @@ mod memory_pressure {

/// Installs one process-wide memory pressure source. It lives for the
/// rest of the process, so it is never released.
///
/// Not installed in unit tests: a real pressure event on the host would
/// release the caches of every test running in the process at once.
/// Tests drive `on_memory_pressure` directly instead.
pub(super) fn watch() {
if cfg!(test) {
return;
}
static WATCH: std::sync::Once = std::sync::Once::new();
WATCH.call_once(|| unsafe {
let source = dispatch_source_create(
Expand Down
Loading