SessionOptionsSetLoadCancellationFlag property
\brief sets load cancellation flag to abort session loading process.
\paramin options instance that was passed to the session at creation time.
\paramin cancel setting this to true after model loading process was initiated will
attempt to cancel the loading process. If cancellation is successful, CreateSession()
CreateSessionFromArray() or any other session creation API that take session options as an
argument will return an OrtStatus indicating that session loading was canceled at user request,
error code ORT_MODEL_LOAD_CANCELED.
The APIs above would not return any valid Session instance. This is the best case effort and the result
is not guaranteed. The session may have already been created and initialized
before the cancellation request was issued.
\snippet{doc} snippets.dox OrtStatus Return Value
\since Version 1.22.
Implementation
external ffi.Pointer<
ffi.NativeFunction<
OrtStatusPtr Function(
ffi.Pointer<OrtSessionOptions> options,
ffi.Bool cancel,
)
>
>
SessionOptionsSetLoadCancellationFlag;