I know this kind of question was asked many time but I really can't decide what should I use between Thread
or Thread pool
.
I'm creating download manager program which can download simultaneously.
I used to use Thread
for downloading each file and observation for queuing download but there are weird problems when I want to stop downloading(call to Thread.Abort
).
Now, I'm using Task.Run
, everything work fine but I'm worrying about suitability because it may run from a minute to hours(many people say about Thread pool with cpu-intensive work but none say about long running like this).
So, what should I use for long running operation like this?
Edit, I use HttpWebRequest, HttpWebResponse and Stream for downloading because I want to calculate BPS, ETA and throttling(obtain from HttpWebResponse).
Edit2, I use WPF as UI, calculate and rise about 4 PropertyChanged
event, I'm so sorry that I didn't provide enough information at the first place.