的Windows 8商店應用不支持主題了:在一個System.Threading.Thread沒有在Windows 8商店應用支持
protected static Thread m_thread = null;
然後:
我創建類庫線程功能:
m_thread = new Thread(new ParameterizedThreadStart(RunDetection));
m_thread.Start(Something);
我還需要中止功能:
m_thread.Abort();
如何在WIN8商店應用程序中執行此操作?
不應該在任何類型的環境中中止線程。 – Servy
訪問'System.Threading'命名空間對於Windows應用商店應用程序來說完全是爲了強制每個I/O或網絡綁定任務實施異步API。現在,線程池線程(通過在Windows.System.Threading命名空間中引入的TPL或'Threadpool'類)是異步排隊工作的唯一方法,它不必在主應用程序線程上運行。 – RBT