This commit is contained in:
龙腾猫跃 committed 2026-06-29 08:18:44 +08:00
1 parent a1fcb5241a
commit d3daf1988f
2 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -178,7 +178,7 @@ public abstract class RedoableWorkerBase<TOut>(Func<CancellationToken?, Progress
(_, timedOut) => completionSource.TrySetResult(!timedOut), null, millisecondsTimeout, executeOnlyOnce: true);
using var cancellationRegistration = cancellationToken.Register(() => completionSource.TrySetCanceled(cancellationToken));
try {
return await completionSource.Task;
return await completionSource.Task.NoCapture();
} finally {
waitHandle.Unregister(null);
}
@@ -207,4 +207,4 @@ public class RedoableWorker : RedoableWorkerBase<NoType?> {
}
/// <summary>指示没有该类型,用于泛型参数。</summary>
public class NoType { }
public class NoType { }