Class to manage the list of jobs and job subqueues that are given to POOL to execute. More...
#include <mi32/mithread.h>
Public Types | |
| enum | FLAGS { FLAG_Default = 0x0000, FLAG_Synchronized = 0x0001 } |
Public Member Functions | |
| QUEUE (const QUEUE &rhs) | |
| QUEUE (FLAGS flags=FLAG_Default) | |
| ~QUEUE () | |
| ID | AddJob (JOB &Job, bool AddToFront=false) |
| ID | AddQueue (QUEUE &Queue, bool AddToFront=false) |
| FLAGS | GetFlags () const |
| ID | GetID () const |
| bool | IsEmpty () const |
| QUEUE & | operator= (const QUEUE &rhs) |
| void | SetDelegateOnCompletion (DELEGATE_VOID_ID delegate) |
Class to manage the list of jobs and job subqueues that are given to POOL to execute.
This class is a reference counted class. Any changes to the queue, such as removal of completed jobs, will change all instances of this queue. There is no MakeExclusive method because JOB's cannot be copied. This does allow a set and forget paradigm for QUEUE's.
| FLAG_Default |
This queue will execute its jobs when a WORKER is available. |
| FLAG_Synchronized |
This queue will wait until all other jobs before it are finished. |
| MITHREAD::QUEUE::QUEUE | ( | FLAGS | flags = FLAG_Default |
) | [explicit] |
Ctor.
| MITHREAD::QUEUE::QUEUE | ( | const QUEUE & | rhs | ) |
Copy ctor.
| MITHREAD::QUEUE::~QUEUE | ( | ) |
Dtor.
Add a JOB to 'this'.
| AddToFront | If 'true', places the job ahead of all other jobs or subqueues on this queue. |
Add a QUEUE subqueue to 'this'.
| Queue | The job subqueue to add to this queue. It may contains JOB's or QUEUE's. | |
| AddToFront | If 'true', places the subqueue ahead of all other jobs or subqueues on this queue. |
| FLAGS MITHREAD::QUEUE::GetFlags | ( | ) | const |
Get the flags set for 'this'.
| ID MITHREAD::QUEUE::GetID | ( | ) | const |
Get the ID for 'this'.
| bool MITHREAD::QUEUE::IsEmpty | ( | ) | const |
Determine if queue is empty.
Should only be used on queue that has not been added to another queue.
| void MITHREAD::QUEUE::SetDelegateOnCompletion | ( | DELEGATE_VOID_ID | delegate | ) |
Set a delegate that gets called when all the jobs are complete.
1.6.1