121 |
121 |
122 |
122 |
123 // Class AbstractWorkGang: |
123 // Class AbstractWorkGang: |
124 // An abstract class representing a gang of workers. |
124 // An abstract class representing a gang of workers. |
125 // You subclass this to supply an implementation of run_task(). |
125 // You subclass this to supply an implementation of run_task(). |
126 class AbstractWorkGang: public CHeapObj { |
126 class AbstractWorkGang: public CHeapObj<mtInternal> { |
127 // Here's the public interface to this class. |
127 // Here's the public interface to this class. |
128 public: |
128 public: |
129 // Constructor and destructor. |
129 // Constructor and destructor. |
130 AbstractWorkGang(const char* name, bool are_GC_task_threads, |
130 AbstractWorkGang(const char* name, bool are_GC_task_threads, |
131 bool are_ConcurrentGC_threads); |
131 bool are_ConcurrentGC_threads); |
400 |
400 |
401 // A class to manage claiming of subtasks within a group of tasks. The |
401 // A class to manage claiming of subtasks within a group of tasks. The |
402 // subtasks will be identified by integer indices, usually elements of an |
402 // subtasks will be identified by integer indices, usually elements of an |
403 // enumeration type. |
403 // enumeration type. |
404 |
404 |
405 class SubTasksDone : public CHeapObj { |
405 class SubTasksDone: public CHeapObj<mtInternal> { |
406 uint* _tasks; |
406 uint* _tasks; |
407 uint _n_tasks; |
407 uint _n_tasks; |
408 // _n_threads is used to determine when a sub task is done. |
408 // _n_threads is used to determine when a sub task is done. |
409 // It does not control how many threads will execute the subtask |
409 // It does not control how many threads will execute the subtask |
410 // but must be initialized to the number that do execute the task |
410 // but must be initialized to the number that do execute the task |