a code like below will start a new thread to do the job. Is there any way I can control the priority of that thread?
Task.Factory.StartNew(() => {
//
For setting priority with Task
, check out the custom task schedulers described by Microsoft expert Stephen Toub in this MSDN blog post. For further detail, don't miss the links to the previous two posts that he mentions in the first sentence.
For your issue, it sounds like you might want to look at the QueuedTaskScheduler
.