Struct EventHandle
- Namespace
- DotCompute.Backends.OpenCL.Execution
- Assembly
- DotCompute.Backends.OpenCL.dll
RAII handle for managed events with automatic cleanup. Ensures events are properly returned to the pool or destroyed when no longer needed.
public readonly struct EventHandle : IAsyncDisposable, IEquatable<EventHandle>
- Implements
- Inherited Members
Properties
Event
Gets the underlying OpenCL event handle.
public OpenCLEventHandle Event { get; }
Property Value
Methods
DisposeAsync()
Asynchronously releases the event back to the manager's pool.
public ValueTask DisposeAsync()
Returns
Equals(EventHandle)
Determines whether the specified handle is equal to the current handle.
public bool Equals(EventHandle other)
Parameters
otherEventHandle
Returns
Equals(object?)
Determines whether the specified object is equal to the current handle.
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
Returns the hash code for this handle.
public override int GetHashCode()
Returns
GetProfilingInfoAsync()
Gets profiling information for this event (if profiling was enabled). Returns null if profiling is not available.
public ValueTask<EventProfilingInfo?> GetProfilingInfoAsync()
Returns
WaitAsync(CancellationToken)
Waits for the event to complete.
public ValueTask WaitAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token.
Returns
Operators
operator ==(EventHandle, EventHandle)
Determines whether two handles are equal.
public static bool operator ==(EventHandle left, EventHandle right)
Parameters
leftEventHandlerightEventHandle
Returns
operator !=(EventHandle, EventHandle)
Determines whether two handles are not equal.
public static bool operator !=(EventHandle left, EventHandle right)
Parameters
leftEventHandlerightEventHandle