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
LockQueueLockCallbackUnlockQueueLockCallback
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
Unlock
public QueueLockCallback? Unlock { get; init; }
Property Value
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
lockNativePointerThe C function that native code calls as
lock.unlockNativePointerThe C function that native code calls as
unlock.userDataNativePointerThe context that native code passes to each function.
releaseUserDataNativePointerThe C function that releases
userData, or Null.
Returns
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.