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

This commit is contained in:
teoxoy
2024-11-26 12:50:46 +01:00
committed by Teodor Tanasoaia
parent 14af686b9f
commit e2eeba7dae
2 changed files with 3 additions and 1 deletions

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,

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,