Metal.SharedEvent
An object used for GPU-GPU or CPU-GPU synchronization, potentially across multiple devices or processes. See MTLSharedEvent.
val sexp_of_t : t -> Sexplib0.Sexp.t
Provides a simple interface for handling MTLSharedEvent notifications. See MTLSharedEventListener.
A serializable object used to recreate a MTLSharedEvent object in another process. See MTLSharedEventHandle.
val set_label : t -> string -> unit
val get_label : t -> string
val set_signaled_value : t -> Unsigned.ULLong.t -> unit
Sets the event's signaled value from the CPU.
val get_signaled_value : t -> Unsigned.ULLong.t
val notify_listener :
t ->
SharedEventListener.t ->
value:Unsigned.ULLong.t ->
(t -> Unsigned.ULLong.t -> unit) ->
unit
Schedules a notification handler block to be called when the event's signaled value reaches or exceeds the specified value. See notifyListener:atValue:block:.
Creates a serializable handle for this shared event. See newSharedEventHandle.
val wait_until_signaled_value :
t ->
value:Unsigned.ULLong.t ->
timeout_ms:Unsigned.ULLong.t ->
bool
Synchronously waits until the signaled value reaches or exceeds the target value, or the timeout elapses. Returns true
if the value was reached, false
on timeout. See waitUntilSignaledValue:timeoutMS:.