How to Start/Stop/Wait for a Thread
问题 I am porting some C# .Net code to WinRT and I am having trouble figuring out how to replace the following: bool threadDone = false; Thread updateThread = null; void StartUpdateThread() { threadDone = false; updateThread = new Thread(new ThreadStart(SendUpdateThread)); updateThread.Start(); } void StopUpdateThread() { if (updateThread == null) return; threadDone = true; updateThread.Join(); updateThread = null; } void SendUpdateThread() { while(!threadDone) { ... Thread.Sleep(...); } } What is