[wgpu-core] document which closures are guaranteed to be called

This commit is contained in:
teoxoy authored and Teodor Tanasoaia committed 2024-11-26 20:31:18 +01:00
1 parent 14af686b9f
commit e2eeba7dae
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -2083,7 +2083,7 @@ impl Global {
self.hub.devices.remove(device_id);
}
/// This closure will be called exactly once during "lose the device".
/// `device_lost_closure` might never be called.
pub fn device_set_device_lost_closure(
&self,
device_id: DeviceId,
@@ -2144,6 +2144,7 @@ impl Global {
self.hub.queues.remove(queue_id);
}
/// `op.callback` is guaranteed to be called.
pub fn buffer_map_async(
&self,
buffer_id: id::BufferId,
+1
View File
@@ -1396,6 +1396,7 @@ impl Queue {
unsafe { self.raw().get_timestamp_period() }
}
/// `closure` is guaranteed to be called.
pub fn on_submitted_work_done(
&self,
closure: SubmittedWorkDoneClosure,