protected void ShutdownNetworkThread(int millisecondsTimeout)
{
_stop = true;
if (_readThread != null)
{
if (!Thread.CurrentThread.Equals(_readThread))
{
_readThread.Join(millisecondsTimeout);
_readThread = null;
}
}
if (_writeThread != null)
{
_pduQueue.ContinueBlocking = false;
if (!Thread.CurrentThread.Equals(_writeThread))
{
_writeThread.Join(millisecondsTimeout);
_writeThread = null;
}
}
if (_processThread!=null)
{
_processingQueue.ContinueBlocking = false;
if (!Thread.CurrentThread.Equals(_processThread))
{
_processThread.Join(millisecondsTimeout);
_processThread = null;
}
}
}