Пример #1
0
        /// <summary>
        /// Using this function reaper thread ask the socket to register with
        /// its poller.
        /// </summary>
        internal void StartReaping([NotNull] Utils.Poller poller)
        {
            //  Plug the socket to the reaper thread.
            m_poller = poller;
            m_handle = m_mailbox.Handle;
            m_poller.AddHandle(m_handle, this);
            m_poller.SetPollin(m_handle);

            //  Initialise the termination and check whether it can be deallocated
            //  immediately.
            Terminate();
            CheckDestroy();
        }
Пример #2
0
        public Reaper(Ctx ctx, int threadId)
            : base(ctx, threadId)
        {
            m_sockets     = 0;
            m_terminating = false;
            m_name        = "reaper-" + threadId;
            m_poller      = new Utils.Poller(m_name);

            mailbox = new Mailbox(m_name);

            m_mailboxHandle = mailbox.Handle;
            m_poller.AddHandle(m_mailboxHandle, this);
            m_poller.SetPollin(m_mailboxHandle);
        }
Пример #3
0
        public Reaper(Ctx ctx, int threadId)
            : base(ctx, threadId)
        {
            m_sockets = 0;
            m_terminating = false;

            string name = "reaper-" + threadId;
            m_poller = new Utils.Poller(name);

            m_mailbox = new Mailbox(name);

            m_mailboxHandle = m_mailbox.Handle;
            m_poller.AddHandle(m_mailboxHandle, this);
            m_poller.SetPollin(m_mailboxHandle);
        }
Пример #4
0
        /// <summary>
        /// Using this function reaper thread ask the socket to register with
        /// its poller.
        /// </summary>
        internal void StartReaping([NotNull] Utils.Poller poller)
        {
            //  Plug the socket to the reaper thread.
            m_poller = poller;
            m_handle = m_mailbox.Handle;
            m_poller.AddHandle(m_handle, this);
            m_poller.SetPollin(m_handle);

            //  Initialise the termination and check whether it can be deallocated
            //  immediately.
            Terminate();
            CheckDestroy();
        }