c# - What is the difference between task and thread? -


in c# 4.0, have task in system.threading.tasks namespace. true difference between thread , task. did sample program(help taken msdn) own sake of learning

parallel.invoke  parallel.for  parallel.foreach  

but have many doubts idea not clear.

i have searched in stackoverflow similar type of question may question title not able same. if knows same type of question being posted here earlier, kindly give reference of link.

a task want done.

a thread 1 of many possible workers performs task.

in .net 4.0 terms, task represents asynchronous operation. thread(s) used complete operation breaking work chunks , assigning separate threads.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -