Browse Source

Corrected the constness of WorkQueue::IsCompleted().

Lasse Öörni 14 years ago
parent
commit
baefa6fb4e
2 changed files with 3 additions and 3 deletions
  1. 1 1
      Engine/Core/WorkQueue.cpp
  2. 2 2
      Engine/Core/WorkQueue.h

+ 1 - 1
Engine/Core/WorkQueue.cpp

@@ -159,7 +159,7 @@ void WorkQueue::Complete()
     }
     }
 }
 }
 
 
-bool WorkQueue::IsCompleted()
+bool WorkQueue::IsCompleted() const
 {
 {
     if (threads_.Size())
     if (threads_.Size())
         return !numActive_ && queue_.Empty();
         return !numActive_ && queue_.Empty();

+ 2 - 2
Engine/Core/WorkQueue.h

@@ -43,7 +43,7 @@ struct WorkItem
     void* aux_;
     void* aux_;
 };
 };
 
 
-/// Work queue subsystem.
+/// Work queue subsystem for multithreading.
 class WorkQueue : public Object
 class WorkQueue : public Object
 {
 {
     OBJECT(WorkQueue);
     OBJECT(WorkQueue);
@@ -70,7 +70,7 @@ public:
     /// Return number of worker threads.
     /// Return number of worker threads.
     unsigned GetNumThreads() const { return threads_.Size(); }
     unsigned GetNumThreads() const { return threads_.Size(); }
     /// Return whether all work is completed.
     /// Return whether all work is completed.
-    bool IsCompleted();
+    bool IsCompleted() const;
     
     
 private:
 private:
     /// Process work items until shut down. Called by the worker threads.
     /// Process work items until shut down. Called by the worker threads.