Skip to content

Commit

Permalink
temp Fix #162
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlend committed Dec 4, 2024
1 parent cac4b82 commit 12bdf9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/kete_core/src/spice/pck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ pub fn get_pck_singleton() -> &'static PckSingleton {
files.reset();
let singleton: PckSingleton = ShardedLock::new(files);
// Store it to the static var, i.e. initialize it
#[allow(static_mut_refs)]
let _ = SINGLETON.write(singleton);
});

// Now we give out a shared reference to the data, which is safe to use concurrently.
#[allow(static_mut_refs)]
SINGLETON.assume_init_ref()
}
}
2 changes: 2 additions & 0 deletions src/kete_core/src/spice/spk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,13 @@ pub fn get_spk_singleton() -> &'static SpkSingleton {
segments.reset();
let singleton: SpkSingleton = ShardedLock::new(segments);
// Store it to the static var, i.e. initialize it
#[allow(static_mut_refs)]
let _ = SINGLETON.write(singleton);
});

// Now we give out a shared reference to the data, which is safe to use
// concurrently.
#[allow(static_mut_refs)]
SINGLETON.assume_init_ref()
}
}

0 comments on commit 12bdf9d

Please sign in to comment.