Skip to content

Commit e6d7348

Browse files
committed
test: 更新单元测试
1 parent cd6c8fd commit e6d7348

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/BootstrapBlazor/Services/ThrottleDispatcher.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ public class ThrottleDispatcher(ThrottleOptions options)
3232
/// <param name="token">取消令牌</param>
3333
public void Throttle(Action action, CancellationToken token = default)
3434
{
35-
var task = InternalThrottleAsync(() => Task.Run(() =>
36-
{
35+
var task = InternalThrottleAsync(() => {
3736
action();
3837
return Task.CompletedTask;
39-
}, CancellationToken.None), token);
38+
}, token);
4039
try
4140
{
4241
task.Wait(token);

0 commit comments

Comments
 (0)