Consult your c # task can be more thread set a background thread, like these two classes, respectively, when using,
CodePudding user response:
The thread is mononuclear multithreading
The task is multicore multithreaded multitasking,
CodePudding user response:
The task is the default background thread If you want to modify for the front desk Task. Factory. StartNew (()=& gt; { //set to the foreground thread Thread. The CurrentThread. IsBackground=false; });
CodePudding user response:
Both basic use in dealing with a time-consuming task, the task I more use in asynchronous processing, thread now basic no.