public void Dispose(int timeoutMs = 500) { _webExchange.Abort(); if (_thread != null) { _thread.Shutdown(timeoutMs); } _thread = null; }
public Status Dispose() { if (_running) { _running = false; bool success = _runningThread.Shutdown(2000); if (!success) { _runningThread.Abort(); return(Status.Aborted); } } return(Status.Ok); }