Пример #1
0
        public void Shutdown()
        {
            if (logger.IsDebugEnabled)
            {
                logger.Debug($"{GetType().Name} Shutdown() - thread request shutdown");
            }

            context.RequestShutdown();

            lock (this)
            {
                if (sessionWatchdogThread == null)
                {
                    return;
                }

                sessionWatchdogThread.Join(ShutdownTimeout);
                sessionWatchdogThread = null;
            }

            if (logger.IsDebugEnabled)
            {
                logger.Debug($"{GetType().Name} Shutdown() - thread stopped");
            }
        }
Пример #2
0
        public void Shutdown()
        {
            if (logger.IsDebugEnabled)
            {
                logger.Debug($"{GetType().Name} thread request shutdown");
            }
            context.RequestShutdown();

            if (beaconSenderThread != null)
            {
                beaconSenderThread.Join(SHUTDOWN_TIMEOUT);
                if (logger.IsDebugEnabled)
                {
                    logger.Debug($"{GetType().Name} thread stopped");
                }
            }
        }