0
Can someone explain me those C# tasks?
See questions
3 Respuestas
+ 2
A task is something you want done by a thread. A great example I read from StackOverflow is "Basically, a Task<T> "promises" to return you a T, but not right now, I'm kinda busy, why don't you come back later?"
To put it another way, a task is something that you want done, but a thread(the worker to do it), shouldn't be made for each and every task. A task is really a small job for a thread to do, when it can get around to it. This way, you're having one thread(a worker) count 20 things, instead of 20 threads counting 20 things.
Here are some resources that are very helpful to explain this more in depth. I recommend StackOverflow's explanation, as it goes pretty deep into it without being a dry read.
https://msdn.microsoft.com/en-us/library/system.threading.tasks.task(v=vs.110).aspx
http://stackoverflow.com/questions/4130194/what-is-the-difference-between-task-and-thread
+ 1
thank you sooo much😄😄
+ 1
Glad to be able to help!