We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd6c8fd commit e6d7348Copy full SHA for e6d7348
src/BootstrapBlazor/Services/ThrottleDispatcher.cs
@@ -32,11 +32,10 @@ public class ThrottleDispatcher(ThrottleOptions options)
32
/// <param name="token">取消令牌</param>
33
public void Throttle(Action action, CancellationToken token = default)
34
{
35
- var task = InternalThrottleAsync(() => Task.Run(() =>
36
- {
+ var task = InternalThrottleAsync(() => {
37
action();
38
return Task.CompletedTask;
39
- }, CancellationToken.None), token);
+ }, token);
40
try
41
42
task.Wait(token);
0 commit comments