Table of Contents

Struct QueueLock

Namespace
Maplibre.NativeFfi
Assembly
Maplibre.NativeFfi.dll

Your lock on a Vulkan queue that you and a render session both submit to.

public readonly record struct QueueLock : IEquatable<QueueLock>
Implements
Inherited Members

Remarks

The session holds the lock only while it submits or presents to the queue. Set both lock and unlock, or neither when you don't submit to the queue yourself.

It can run on a library thread, and it can't call the library.

See mln_queue_lock in the C API reference.

Constructors

QueueLock(QueueLockCallback?, QueueLockCallback?)

Your lock on a Vulkan queue that you and a render session both submit to.

public QueueLock(QueueLockCallback? Lock, QueueLockCallback? Unlock)

Parameters

Lock QueueLockCallback
Unlock QueueLockCallback

Remarks

The session holds the lock only while it submits or presents to the queue. Set both lock and unlock, or neither when you don't submit to the queue yourself.

It can run on a library thread, and it can't call the library.

See mln_queue_lock in the C API reference.

Properties

Lock

public QueueLockCallback? Lock { get; init; }

Property Value

QueueLockCallback

Unlock

public QueueLockCallback? Unlock { get; init; }

Property Value

QueueLockCallback

Methods

Native(NativePointer, NativePointer, NativePointer, NativePointer)

Creates a native registration from C functions and a context that the host supplies. The binding copies them unchanged, so native code calls each function without entering the .NET runtime.

public static QueueLock Native(NativePointer @lock, NativePointer unlock, NativePointer userData, NativePointer releaseUserData)

Parameters

lock NativePointer

The C function that native code calls as lock.

unlock NativePointer

The C function that native code calls as unlock.

userData NativePointer

The context that native code passes to each function.

releaseUserData NativePointer

The C function that releases userData, or Null.

Returns

QueueLock

Remarks

The first call that carries this value or a copy of it consumes the registration. Native code releases the context of a call that it accepts, and the binding calls the release for a call that native code does not accept. A later call that carries the registration throws an invalid-state MaplibreException before it reaches native code.