Class RuntimeInitializationService
- Namespace
- DotCompute.Runtime.Services
- Assembly
- DotCompute.Runtime.dll
Hosted service for initializing the DotCompute runtime at application startup
public class RuntimeInitializationService : IHostedService
- Inheritance
-
RuntimeInitializationService
- Implements
- Inherited Members
Constructors
RuntimeInitializationService(AcceleratorRuntime, IOptions<DotComputeRuntimeOptions>, ILogger<RuntimeInitializationService>)
Hosted service for initializing the DotCompute runtime at application startup
public RuntimeInitializationService(AcceleratorRuntime runtime, IOptions<DotComputeRuntimeOptions> options, ILogger<RuntimeInitializationService> logger)
Parameters
runtimeAcceleratorRuntimeoptionsIOptions<DotComputeRuntimeOptions>loggerILogger<RuntimeInitializationService>
Methods
StartAsync(CancellationToken)
Gets start asynchronously.
public Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
The result of the operation.
StopAsync(CancellationToken)
Gets stop asynchronously.
public Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
The result of the operation.