public void Dispose() { if (Disposed) return; Disposed = true; MainLoop.QueueWait(delegate { this.DhtEngine.Dispose(); this.DiskManager.Dispose(); this._listenManager.Dispose(); this._localPeerListener.Stop(); this._localPeerManager.Dispose(); }); }