public void Stop() { if (workerThread != null) { workerThread.Stop(); workerThread = null; } }
public void Start() { if (workerThread == null) { workerThread = CreateWorkerThread(DelegateToRun); workerThread.Start(); } }