We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#[track_caller]
Registry
1 parent f56914c commit 3f6f1d7Copy full SHA for 3f6f1d7
wgpu-core/src/registry.rs
@@ -101,9 +101,11 @@ impl<T: StorageItem> Registry<T> {
101
pub(crate) fn get(&self, id: Id<T::Marker>) -> Result<Arc<T>, InvalidId> {
102
self.read().get_owned(id)
103
}
104
+ #[track_caller]
105
pub(crate) fn read<'a>(&'a self) -> RwLockReadGuard<'a, Storage<T>> {
106
self.storage.read()
107
108
109
pub(crate) fn write<'a>(&'a self) -> RwLockWriteGuard<'a, Storage<T>> {
110
self.storage.write()
111
0 commit comments