Class AcceleratorEvent
- Namespace
- DotCompute.Abstractions
- Assembly
- DotCompute.Abstractions.dll
Represents an event for stream synchronization.
public abstract class AcceleratorEvent : IDisposable
- Inheritance
-
AcceleratorEvent
- Implements
- Inherited Members
- Extension Methods
Properties
Handle
Gets the native handle for this event.
public abstract nint Handle { get; }
Property Value
IsCompleted
Gets whether this event has completed.
public abstract bool IsCompleted { get; }
Property Value
IsRecorded
Gets whether this event has been recorded.
public abstract bool IsRecorded { get; }
Property Value
Methods
Dispose()
Disposes of this event.
public void Dispose()
Dispose(bool)
Releases managed and unmanaged resources.
protected virtual void Dispose(bool disposing)
Parameters
disposingboolTrue if called from Dispose(), false if called from finalizer.
GetElapsedTime(AcceleratorEvent)
Gets the elapsed time between this event and another event.
public abstract TimeSpan? GetElapsedTime(AcceleratorEvent startEvent)
Parameters
startEventAcceleratorEventThe start event.
Returns
- TimeSpan?
The elapsed time, or null if not available.
Wait(TimeSpan)
Synchronously waits for this event to complete.
public abstract bool Wait(TimeSpan timeout)
Parameters
timeoutTimeSpanThe maximum time to wait.
Returns
- bool
True if the event completed within the timeout, false otherwise.
WaitAsync(CancellationToken)
Asynchronously waits for this event to complete.
public abstract ValueTask WaitAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token.
Returns
- ValueTask
A task that completes when the event is signaled.