public void Stop() {
Interlocked.Exchange(ref _running, 0);
lock( _sync ) {
_sub = null;
}
_uc.Close();
if(_mc != null) {
_mc.Close();
}
if( Thread.CurrentThread != _listen_thread ) {
// Join if we are in a different thread
_listen_thread.Join();
}
}