public void StopNIDSEvent() { if (_event != null) { _event.Set(); } if (_thread == null) { return; } if (_thread.Join(3000)) { _thread.Abort(); _thread = null; } //将ZMQ的内容,销毁 foreach (var tag in EventTags) { _subscriber.Unsubscribe(tag, MsgEncoding); } _subscriber.Dispose(); _context.Dispose(); }
public void Dispose() { if (_zeromqContext != null) { _zeromqContext.Dispose(); } }
public void Dispose() { isRunning = false; itemsReadyToSend.Set(); // wake up the send thread //wait till the threads have closed their sockets before closing the context while (threadStillRunning != 0) { Thread.Sleep(1); } CTX.Dispose(); }