Skip to content

Commit

Permalink
Use Task.Run
Browse files Browse the repository at this point in the history
  • Loading branch information
seionmoya committed Sep 9, 2024
1 parent 43c676b commit 3f0ed24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Fuyu.Common/Networking/HttpRouter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task RouteAsync(HttpContext context)

foreach (var match in matches)
{
await match.RunAsync(context);
await Task.Run(() => match.RunAsync(context));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Fuyu.Common/Networking/WsRouter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task RouteAsync(WsContext context)

foreach (var match in matches)
{
await match.RunAsync(context);
await Task.Run(() => match.RunAsync(context));
}
}
}
Expand Down

0 comments on commit 3f0ed24

Please sign in to comment.