mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
[core] Add #[track_caller]
to Registry
lock methods.
This commit is contained in:
parent
f56914cea9
commit
3f6f1d766c
@ -101,9 +101,11 @@ impl<T: StorageItem> Registry<T> {
|
||||
pub(crate) fn get(&self, id: Id<T::Marker>) -> Result<Arc<T>, InvalidId> {
|
||||
self.read().get_owned(id)
|
||||
}
|
||||
#[track_caller]
|
||||
pub(crate) fn read<'a>(&'a self) -> RwLockReadGuard<'a, Storage<T>> {
|
||||
self.storage.read()
|
||||
}
|
||||
#[track_caller]
|
||||
pub(crate) fn write<'a>(&'a self) -> RwLockWriteGuard<'a, Storage<T>> {
|
||||
self.storage.write()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user