QueueLock.native constructor
- required NativePointer lock,
- required NativePointer unlock,
- NativePointer userData = NativePointer.nullPointer,
- NativePointer releaseUserData = NativePointer.nullPointer,
Creates a native registration from lock, unlock, userData, and
releaseUserData, which native code in the host supplies. The binding
copies them unchanged.
The first call that carries the registration consumes it, and a later
call throws an invalid-state error. Native code releases the context
of a call that it accepts, and the binding calls releaseUserData for
a call that native code does not accept.
Implementation
QueueLock.native({
required NativePointer lock,
required NativePointer unlock,
NativePointer userData = NativePointer.nullPointer,
NativePointer releaseUserData = NativePointer.nullPointer,
}) {
nativeRegistrations[this] = NativeRegistration(
[lock, unlock],
userData,
releaseUserData,
);
}