Skip to content

Commit 4eb2804

Browse files
authored
[Example] Forward CancellationToken to Delay call (#119)
1 parent b1a0684 commit 4eb2804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/gettingstarted.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public class MyTimeService : ITimeService
183183
{
184184
while (!cancel.IsCancellationRequested)
185185
{
186-
await Task.Delay(TimeSpan.FromSeconds(10));
186+
await Task.Delay(TimeSpan.FromSeconds(10), cancel);
187187
yield return new TimeResult { Time = DateTime.UtcNow };
188188
}
189189
}
@@ -308,4 +308,4 @@ services just like it would have done within ASP.NET Core, but now using the nat
308308
This is just a *very brief introduction* to what you can do with protobuf-net and gRPC using protobuf-net.Grpc; if you
309309
want to play with it, please feel free to do so. Log issues, make suggestions, etc. Have fun.
310310

311-
And if this could save you a ton of time, you're always welcome to [![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/marcgravell)
311+
And if this could save you a ton of time, you're always welcome to [![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/marcgravell)

0 commit comments

Comments
 (0)