Changeset 21045

Show
Ignore:
Timestamp:
02/23/08 09:13:22 (9 months ago)
Author:
patrick
Message:

After reviewing the implementation of this class and the way that it is
tested, it seems to me that the public interface is supposed to be quite
small. I have moved method declarations around to make the interal API
private.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vapor/vpr/Thread/ThreadPool.h

    r21043 r21045  
    100100   } 
    101101 
     102   /** 
     103    * Waits until all threads are done doing their work. 
     104    * 
     105    * @note This was renamed from \c barrier() in version 0.92.1 to deal with 
     106    *       a case where that name is a preprocessor macro. 
     107    * 
     108    * @since 0.92.1 
     109    */ 
     110   void wait() 
     111   { 
     112      mFinishedLock.acquire();      // Get the lock that means threads done 
     113      mFinishedLock.release();      // Reset it to done 
     114   } 
     115 
     116   void printList() const; 
     117 
     118private: 
    102119   OneThread* addThread(); 
    103120 
     
    123140   OneThread* getThread(); 
    124141 
    125    /** 
    126     * Waits until all threads are done doing their work. 
    127     * 
    128     * @note This was renamed from \c barrier() in version 0.92.1 to deal with 
    129     *       a case where that name is a preprocessor macro. 
    130     * 
    131     * @since 0.92.1 
    132     */ 
    133    void wait() 
    134    { 
    135       mFinishedLock.acquire();      // Get the lock that means threads done 
    136       mFinishedLock.release();      // Reset it to done 
    137    } 
    138  
    139    void printList() const; 
    140  
    141 private: 
    142142   Semaphore mReadyThreads;    /**< Count represents threads ready to work */ 
    143143   Mutex mListLock;            /**< Mutex control of threadList head */