VirtualBox

Changeset 83198 in vbox


Ignore:
Timestamp:
Mar 4, 2020 10:58:40 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: Own thread-pool for cloud related tasks, they can take too much time and freeze local GUI tasks.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

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

    r82968 r83198  
    311311    , m_i3DAvailable(-1)
    312312    , m_pThreadPool(0)
     313    , m_pThreadPoolCloud(0)
    313314    , m_pIconPool(0)
    314315    , m_pMediumEnumerator(0)
     
    41084109            this, &UICommon::sltHandleVBoxSVCAvailabilityChange);
    41094110
    4110     /* Prepare thread-pool instance: */
     4111    /* Prepare thread-pool instances: */
    41114112    m_pThreadPool = new UIThreadPool(3 /* worker count */, 5000 /* worker timeout */);
     4113    m_pThreadPoolCloud = new UIThreadPool(2 /* worker count */, 1000 /* worker timeout */);
    41124114
    41134115    /* Load translation based on the user settings: */
     
    45574559    UIConverter::cleanup();
    45584560
    4559     /* Cleanup thread-pool: */
     4561    /* Cleanup thread-pools: */
    45604562    delete m_pThreadPool;
    45614563    m_pThreadPool = 0;
     4564    delete m_pThreadPoolCloud;
     4565    m_pThreadPoolCloud = 0;
    45624566    /* Cleanup general icon-pool: */
    45634567    delete m_pIconPool;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r82968 r83198  
    620620        /** Returns the thread-pool instance. */
    621621        UIThreadPool *threadPool() const { return m_pThreadPool; }
     622        /** Returns the thread-pool instance for cloud needs. */
     623        UIThreadPool *threadPoolCloud() const { return m_pThreadPoolCloud; }
    622624    /** @} */
    623625
     
    901903        /** Holds the thread-pool instance. */
    902904        UIThreadPool *m_pThreadPool;
     905        /** Holds the thread-pool instance for cloud needs. */
     906        UIThreadPool *m_pThreadPoolCloud;
    903907    /** @} */
    904908
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp

    r83163 r83198  
    287287    {
    288288        m_pTask = new UITaskCloudGetInstanceInfo(m_guiCloudMachine);
    289         connect(m_pTask, &UITask::sigComplete,
     289        connect(uiCommon().threadPoolCloud(), &UIThreadPool::sigTaskComplete,
    290290                this, &UIVirtualMachineItemCloud::sltHandleGetCloudInstanceInfoDone);
    291         uiCommon().threadPool()->enqueueTask(m_pTask);
     291        uiCommon().threadPoolCloud()->enqueueTask(m_pTask);
    292292    }
    293293}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r83178 r83198  
    484484                                    if (pTask)
    485485                                    {
    486                                         connect(pTask, &UITask::sigComplete,
     486                                        connect(uiCommon().threadPoolCloud(), &UIThreadPool::sigTaskComplete,
    487487                                                this, &UIChooserAbstractModel::sltHandleCloudAcquireInstancesTaskComplete);
    488                                         uiCommon().threadPool()->enqueueTask(pTask);
     488                                        uiCommon().threadPoolCloud()->enqueueTask(pTask);
    489489                                    }
    490490                                }
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