Skip to main content

ExternalQueueLock

Trait ExternalQueueLock 

Source
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 native decoder sharing the renderer’s queue must take the same lock. GpuContext takes it around every call that can reach the native queue. Implementations must be re-entrant, because a queue-completion callback may submit while the lock is held.

Required Methods§

Source

fn lock(&self)

Acquires exclusive access to the shared queue.

Source

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".

Implementors§