優先度の異なるいくつかのメソッドを非同期で呼び出す必要があります。
私の最初のアイデアは、ThreadPool を使用して、スレッドの優先度を次のように変更することでした。
static void Run()
{
ThreadPool.QueueUserWorkItem(new WaitCallback(SomeMethod));
}
static void SomeMethod(object o)
{
Thread.CurrentThread.Priority = ThreadPriority.BelowNormal; // is this ok?
// do some work here
}
それは機能しますか、それとも何をお勧めしますか?