Table of Contents

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

nint

IsCompleted

Gets whether this event has completed.

public abstract bool IsCompleted { get; }

Property Value

bool

IsRecorded

Gets whether this event has been recorded.

public abstract bool IsRecorded { get; }

Property Value

bool

Methods

Dispose()

Disposes of this event.

public void Dispose()

Dispose(bool)

Releases managed and unmanaged resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

True 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

startEvent AcceleratorEvent

The 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

timeout TimeSpan

The 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

cancellationToken CancellationToken

Cancellation token.

Returns

ValueTask

A task that completes when the event is signaled.