*
This commit is contained in:
1 parent
a1fcb5241a
commit
d3daf1988f
2 files changed
+8
-8
No files matched your search
@@ -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 { }
|
||||
Reference in new issue
Block a user