VirtualBox

Ignore:
Timestamp:
Oct 6, 2013 10:34:17 PM (11 years ago)
Author:
vboxsync
Message:

UIThreadPool.cpp: Don't use isTerminating() when owning the mutex, just access the m_fTerminating member directly. This way we can avoid requiring a recursive mutex and get rid of the warning messgae on X11 about not mixing QWaitCondition and recursive mutexes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.cpp

    r48908 r48910  
    8282    , m_cIdleWorkers(0)
    8383    , m_fTerminating(false) /* termination status */
    84     , m_everythingLocker(QMutex::Recursive)
     84    , m_everythingLocker(QMutex::NonRecursive)
    8585{
    8686}
     
    156156}
    157157
     158/**
     159 * Checks if the thread pool is terminating.
     160 *
     161 * @returns @c true if terminating, @c false if not.
     162 * @note    Do NOT call this while owning the thread pool mutex!
     163 */
    158164bool UIThreadPool::isTerminating() const
    159165{
     
    198204
    199205    bool fIdleTimedOut = false;
    200     while (!isTerminating())
     206    while (!m_fTerminating)
    201207    {
    202208        Assert(m_workers[pWorker->getIndex()] == pWorker); /* paranoia */
Note: See TracChangeset for help on using the changeset viewer.

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