Exemple #1
0
        public void StopMessageProcessing()
        {
            if (_assignmentThread != null && _assignmentThread.IsAlive)
            {
#if !NETCORE
                _assignmentThread.Abort();
#elif NETCORE
                _assignmentThread.Interrupt();
#endif
            }

            if (_notificationThread != null && _notificationThread.IsAlive)
            {
#if !NETCORE
                _notificationThread.Abort();
#elif NETCORE
                _notificationThread.Interrupt();
#endif
            }

            if (_taskExpiry != null)
            {
                _taskExpiry.Cancel();
            }
        }
Exemple #2
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or
        /// resetting unmanaged resources.
        /// </summary>
        public virtual void Dispose()
        {
            if (_taskExpiry != null)
            {
                _taskExpiry.Cancel();
                _taskExpiry = null;
            }

            lock (_status_mutex)
            {
                _mainIndex.Clear();
                _mainIndex = null;

                _transitoryIndex.Clear();
                _transitoryIndex       = null;
                _expirationManagerSize = 0;
            }
            GC.SuppressFinalize(this);
        }
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or
        /// resetting unmanaged resources.
        /// </summary>
        public virtual void Dispose()
        {
            if (_taskExpiry != null)
            {
                _taskExpiry.Cancel();
                _taskExpiry = null;
            }


            if (_cdbSyncMgr != null)
            {
                _cdbSyncMgr.ClearResourcePools();
                //_cdbSyncMgr.Clear();
            }

            if (_notifBasedDepMgr != null)
            {
                _notifBasedDepMgr.EndOperations();
                _notifBasedDepMgr.Dispose(false);
                _notifBasedDepMgr.Clear();
                _notifBasedDepMgr = null;
            }


            lock (_status_mutex)
            {
                _mainIndex.Clear();
                _mainIndex = null;

                _transitoryIndex.Clear();
                _transitoryIndex = null;

                _expirationManagerSize = 0;
            }
            GC.SuppressFinalize(this);
        }