pub trait ExternalQueueLock:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn lock(&self);
fn unlock(&self);
}Expand description
Serializes queue access with another API that shares the same queue.
A queue must be externally synchronized. When a native decoder submits to
the same queue as the renderer, both sides have to take one lock, and
neither owns the other’s submissions. GpuContext takes it around every
call that can reach the native queue, not only submissions. Implementations
must be re-entrant: one thread can submit while already holding the lock,
for example when a queue-completion callback releases a resource.
Required Methods§
Sourcefn unlock(&self)
fn unlock(&self)
Releases access taken by ExternalQueueLock::lock.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".