VirtualBox

Ignore:
Timestamp:
Jul 23, 2010 7:22:44 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63955
Message:

Main, Python: session API changes, cleanup, tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/EventImpl.cpp

    r31018 r31034  
    812812    ::RTCritSectEnter(&mcsQLock);
    813813
    814     // If there was no events reading from the listener for the long time,
    815     // and events keep coming we shall unregister it.
    816     if ((mQueue.size() > 200) && ((RTTimeMilliTS() - mLastRead) > 60 * 1000))
     814    // If there was no events reading from the listener for the long time,
     815    // and events keep coming, or queue is oversized we shall unregister this listener.
     816    uint64_t sinceRead = RTTimeMilliTS() - mLastRead;
     817    uint32_t queueSize = mQueue.size();
     818    if ( (queueSize > 200) || ((queueSize > 100) && (sinceRead > 60 * 1000)))
    817819    {
    818820        ::RTCritSectLeave(&mcsQLock);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette