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
Post a Comment