public void Stop() { if (!_isWorking) { return; } _isWorking = false; ThreadEx.Stop(_analyzeThead); _listAudioPES.Clear(); _listVideoPES.Clear(); _queueFrame.Clear(); ms.Close(); }
private void btnThreadEx_Click(object sender, RoutedEventArgs e) { if (_thread != null) { _thread.Stop(); _thread.Dispose(); _thread = null; return; } _thread = new ThreadEx(ThreadMethod, "xx", true); _thread.Start(); }