Beispiel #1
0
        /// <inheritdoc />
        protected override void QueueTask(Task task)
        {
            if (task == null)
            {
                throw new ArgumentNullException(nameof(task));
            }

            if (m_disposeState == (int)DisposeState.Undisposed)
            {
                m_tasksQueue.Enqueue(task);
            }
        }
        protected override void QueueTask(Task task)
        {
            if (task == null)
            {
                throw new ArgumentNullException(nameof(task));
            }
            CheckDisposed();

            // We are not allowing new tasks will disposing
            if (m_disposeState == (int)DisposeState.Disposing)
            {
                throw new ObjectDisposedException("NetMQPoller");
            }

            m_tasksQueue.Enqueue(task);
        }