Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cancellable wait or find
#2
Can you provide one or more examples where it can be useful?

Maybe this can be used instead:
Code:
Copy      Help
var cts = new CancellationTokenSource(1000);
Task.Run(() => { 3.s(); }).Wait(cts.Token);

I don't want to add rarely used parameters (CancellationToken) to these functions.


Messages In This Thread
Cancellable wait or find - by darkraise - 09-18-2023, 06:09 AM
RE: Cancellable wait or find - by Gintaras - 09-18-2023, 01:04 PM
RE: Cancellable wait or find - by darkraise - 09-23-2023, 03:13 AM
RE: Cancellable wait or find - by Gintaras - 10-10-2023, 05:46 AM
RE: Cancellable wait or find - by darkraise - 10-29-2023, 01:21 PM
RE: Cancellable wait or find - by Gintaras - 10-29-2023, 06:44 PM
RE: Cancellable wait or find - by darkraise - 10-29-2023, 10:11 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)