Class PersistentKernelHost
Host service for persistent GPU kernels with ring buffer I/O
public sealed class PersistentKernelHost : IHostedService, IDisposable
- Inheritance
-
PersistentKernelHost
- Implements
- Inherited Members
Constructors
PersistentKernelHost(ILogger<PersistentKernelHost>, IServiceProvider, IOptions<PersistentKernelHostOptions>, KernelCatalog)
Initializes a new instance of the PersistentKernelHost class.
public PersistentKernelHost(ILogger<PersistentKernelHost> logger, IServiceProvider serviceProvider, IOptions<PersistentKernelHostOptions> options, KernelCatalog kernelCatalog)
Parameters
loggerILogger<PersistentKernelHost>The logger for diagnostic output.
serviceProviderIServiceProviderThe service provider for dependency resolution.
optionsIOptions<PersistentKernelHostOptions>The host options configuration.
kernelCatalogKernelCatalogThe kernel catalog for resolving kernels.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetBufferStatistics()
Gets ring buffer statistics
public Dictionary<string, RingBufferStats> GetBufferStatistics()
Returns
GetKernelStatuses()
Gets the status of all running kernels
public Dictionary<string, KernelInstanceStatus> GetKernelStatuses()
Returns
RestartKernelAsync(string, CancellationToken)
Restarts a specific kernel
public Task RestartKernelAsync(string kernelId, CancellationToken cancellationToken = default)
Parameters
kernelIdstringcancellationTokenCancellationToken
Returns
StartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
public Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenIndicates that the start process has been aborted.
Returns
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
public Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenIndicates that the shutdown process should no longer be graceful.