Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Task.Factory - ending a task

$
0
0
I have a fairly simple {I hope} question - I use Task.Factory.StartNew(() to start a task that runs in a loop indefinitely. However, I want to set up an event handler that ends/stops that method when a specified event occurs. How would I do that?

C# newbie, learning on the go. I will probably ask a lot of followup questions about any answers already given, so fair warning and all.


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>