Table of Contents

Method DropAsync

Namespace
Qavren.Edge.Onnx
Assembly
Qavren.Edge.Onnx.dll

DropAsync(bool, CancellationToken)

Marks matching sessions for drop and disposes the idle ones. Returns the count actually released; leased sessions die as their leases return.

Task<int> DropAsync(bool includePinned = false, CancellationToken cancellationToken = default)

Parameters

includePinned bool

False - the memory-pressure path - skips sessions whose OnnxSessionOptions.DropOnMemoryPressure is false. True is shutdown.

cancellationToken CancellationToken

Cancellation.

Returns

Task<int>

How many sessions were disposed synchronously.