Only setting callback if the token can be cancelled.

This commit is contained in:
Martin Evans 2024-04-27 02:55:35 +01:00
parent 00df7c1516
commit 9867b4c85d
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ namespace LLama
{
#if !NETSTANDARD2_0
// Overwrite the progress callback with one which polls the cancellation token
//if (token.CanBeCanceled)
if (token.CanBeCanceled)
{
var internalCallback = lparams.progress_callback;
lparams.progress_callback = (progress, ctx) =>