|
@@ -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.
|