mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
use a read
guard instead of write
This commit is contained in:
parent
eb0eb342cf
commit
ef7d27233e
@ -259,12 +259,9 @@ impl Global {
|
||||
) -> Result<(), WaitIdleError> {
|
||||
let hub = A::hub(self);
|
||||
|
||||
let last_submission = {
|
||||
let buffer_guard = hub.buffers.write();
|
||||
match buffer_guard.get(buffer_id) {
|
||||
Ok(buffer) => buffer.submission_index(),
|
||||
Err(_) => return Ok(()),
|
||||
}
|
||||
let last_submission = match hub.buffers.read().get(buffer_id) {
|
||||
Ok(buffer) => buffer.submission_index(),
|
||||
Err(_) => return Ok(()),
|
||||
};
|
||||
|
||||
hub.devices
|
||||
|
Loading…
Reference in New Issue
Block a user