VirtualBox

Changeset 57626 in vbox


Ignore:
Timestamp:
Sep 4, 2015 12:46:41 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Thread-pool: Doxy (part 2).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

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

    r57618 r57626  
    3434
    3535
    36 /**
    37  * COM capable worker thread for the UIThreadPool.
    38  */
     36/** QThread extension used as worker-thread.
     37  * Capable of executing COM-related tasks. */
    3938class UIThreadWorker : public QThread
    4039{
     
    4342signals:
    4443
    45     /* Notifier: Worker stuff: */
     44    /** Notifies listeners about @a pWorker finished. */
    4645    void sigFinished(UIThreadWorker *pWorker);
    4746
    4847public:
    4948
    50     /* Constructor: */
     49    /** Constructs worker-thread for parent worker-thread @a pPool.
     50      * @param iIndex defines worker-thread index within the worker-thread pool registry. */
    5151    UIThreadWorker(UIThreadPool *pPool, int iIndex);
    5252
     53    /** Returns worker-thread index within the worker-thread pool registry. */
    5354    int getIndex() const { return m_iIndex; }
    5455
    55     /** Disables sigFinished. For optimizing pool termination. */
     56    /** Disables sigFinished signal, for optimizing worker-thread pool termination. */
    5657    void setNoFinishedSignal()
    5758    {
     
    6162private:
    6263
    63     /* Helper: Worker stuff: */
     64    /** Contains the worker-thread body. */
    6465    void run();
    6566
    66     /* Variables: General stuff: */
     67    /** Holds the worker-thread pool reference. */
    6768    UIThreadPool *m_pPool;
    6869
    69     /** The index into UIThreadPool::m_workers. */
     70    /** Holds the worker-thread index within the worker-thread pool registry. */
    7071    int m_iIndex;
    71     /** Indicates whether sigFinished should be emitted or not. */
     72
     73    /** Holds whether sigFinished signal should be emitted or not. */
    7274    bool m_fNoFinishedSignal;
    7375};
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIThreadPool.h

    r57612 r57626  
    5252    ~UIThreadPool();
    5353
    54     /** Enqueues @a pTask into task-queue. */
     54    /** Enqueues @a pTask into the task-queue. */
    5555    void enqueueTask(UITask *pTask);
    5656
     
    6262protected:
    6363
    64     /** Returns dequeued top-most task from the task-queue using @a pWorker as a hint.
    65       * @remarks Called by the worker-thread. */
     64    /** Returns dequeued top-most task from the task-queue.
     65      * @remarks Called by the @a pWorker passed as a hint. */
    6666    UITask* dequeueTask(UIThreadWorker *pWorker);
    6767
     
    8484        QVector<UIThreadWorker*> m_workers;
    8585        /** Holds the number of worker-threads.
    86           * @remarks We cannot use the vector size since it may contain NULL pointers. */
     86          * @remarks We cannot use the vector size since it may contain 0 pointers. */
    8787        int m_cWorkers;
    8888        /** Holds the number of idle worker-threads. */
     
    114114};
    115115
    116 /** QObject extension used as worker-thread task.
    117   * Describes task to be executed by the UIThreadPool object. */
     116/** QObject extension used as worker-thread task interface.
     117  * Describes task to be executed by the UIThreadWorker object. */
    118118class UITask : public QObject
    119119{
     
    128128
    129129    /** Constructs worker-thread task.
    130       * @param data defines inter-thread task data to be processed by worker-thread. */
     130      * @param data defines inter-thread task data to be processed
     131      *             by worker-thread and returned back if necessary. */
    131132    UITask(const QVariant &data);
    132133
     
    140141    void start();
    141142
    142     /** Contains the abstract task body, to be reimplemented in sub-class. */
     143    /** Contains the abstract task body.
     144      * @remarks To be reimplemented in sub-class. */
    143145    virtual void run() = 0;
    144146
    145147//private:
    146148
    147     /** Holds the inter-thread task data to be processed by worker-thread. */
     149    /** Holds the inter-thread task data. */
    148150    QVariant m_data;
    149151
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