public WaitHandle Run() { WmiBase.Singleton.DebugMsg("Clipboard thread starting"); wmisession = WmiBase.Singleton.GetXenStoreSession("Clipboard"); clipboard = new ClipboardAccess(wmisession); state = new ClipboardStateMachine(clipboard, wmisession, exceptionhandler); lock (statelock) { running = true; WaitHandle threadhandle = state.Run(); shutdowncallback = ThreadPool.RegisterWaitForSingleObject(threadhandle, shutdownCallback, null, Timeout.Infinite, true); } return(done); }
public WaitHandle Run() { WmiBase.Singleton.DebugMsg("Clipboard thread starting"); wmisession = WmiBase.Singleton.GetXenStoreSession("Clipboard"); clipboard = new ClipboardAccess(wmisession); state = new ClipboardStateMachine(clipboard, wmisession, exceptionhandler); lock (statelock) { running = true; WaitHandle threadhandle = state.Run(); shutdowncallback = ThreadPool.RegisterWaitForSingleObject(threadhandle, shutdownCallback, null, Timeout.Infinite, true); } return done; }