NetMQ.Core.Utils.Poller.Stop C# (CSharp) Method

Stop() public method

Signal that we want to stop the polling-loop. This method returns immediately - it does not wait for the polling thread to stop.
public Stop ( ) : void
return void
        public void Stop()
        {
            m_stopping = true;
        }

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// Respond to the Stop command by signaling the polling-loop to terminate,
        /// and if there're no sockets left to reap - stop the poller.
        /// </summary>
        protected override void ProcessStop()
        {
            m_terminating = true;

            // If there are no sockets being reaped finish immediately.
            if (m_sockets == 0)
            {
                SendDone();
                m_poller.RemoveHandle(m_mailboxHandle);
                m_poller.Stop();
            }
        }