OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
/// <summary>
/// Does an early check to see if this queue empty callback is already
/// running, then asynchronously firing the event
/// </summary>
/// <param name="categories">Throttle categories to fire the callback for</param>
Does an early check to see if this queue empty callback is already
running, then asynchronously firing the event
Does an early check to see if this queue empty callback is already running then asynchronously firing the event
private void BeginFireQueueEmpty(ThrottleOutPacketTypeFlags categories)
        {
            if (!m_isQueueEmptyRunning && (Environment.TickCount & Int32.MaxValue) >= m_nextOnQueueEmpty)
            {
                m_isQueueEmptyRunning = true;
                int start = Environment.TickCount & Int32.MaxValue;
                const int MIN_CALLBACK_MS = 30;
                m_nextOnQueueEmpty = start + MIN_CALLBACK_MS;
                if (m_nextOnQueueEmpty == 0)
                    m_nextOnQueueEmpty = 1;
                m_categories = categories;
                if (HasUpdates(m_categories))
                {
                    if (!m_udpServer.OqrEngine.IsRunning)
                    {
                        Util.FireAndForget(FireQueueEmpty, categories, "LLUDPClient.BeginFireQueueEmpty");
                    }
                    else
                    {
                        m_udpServer.OqrEngine.QueueJob(AgentID.ToString(), () => FireQueueEmpty(categories));
                    }
                }
                else
                {
                    m_isQueueEmptyRunning = false;
                }
            }
        }
private void BeginFireQueueEmpty ( ThrottleOutPacketTypeFlags categories ) { if ( ! m_isQueueEmptyRunning && ( Environment . TickCount & Int32 . MaxValue ) >= m_nextOnQueueEmpty ) { m_isQueueEmptyRunning = true ; int start = Environment . TickCount & Int32 . MaxValue ; const int MIN_CALLBACK_MS = 30 ; m_nextOnQueueEmpty = start + MIN_CALLBACK_MS ; if ( m_nextOnQueueEmpty == 0 ) m_nextOnQueueEmpty = 1 ; m_categories = categories ; if ( HasUpdates ( m_categories ) ) { if ( ! m_udpServer . OqrEngine . IsRunning ) { Util . FireAndForget ( FireQueueEmpty , categories , " " ) ; } else { m_udpServer . OqrEngine . QueueJob ( AgentID . ToString ( ) , ( ) => FireQueueEmpty ( categories ) ) ; } } else { m_isQueueEmptyRunning = false ; } } }
Does an early check to see if this queue empty callback is already
running, then asynchronously firing the event
Does an early check to see if this queue empty callback is already running then asynchronously firing the event
//            if (m_nextOnQueueEmpty != 0 && (Environment.TickCount & Int32.MaxValue) >= m_nextOnQueueEmpty) // Use a value of 0 to signal that FireQueueEmpty is running //                m_nextOnQueueEmpty = 0; // Asynchronously run the callback
categories
ThrottleOutPacketTypeFlags
Throttle categories to fire the callback for
Throttle categories to fire the callback for