Thread pool task manager initialization

For an overview of the thread pool task manager please see: Thread pool task manager: overview.

Thread pool task manager initialization sequence

The initialization for the thread pool task manager is handled by its constructor as depicted in the following sequence diagram. The detail of the thread worker initialization is contained in a separate diagram.

mtf-runtime-taskman-init.png

The initialization sequence consists of the following steps:
  1. InitializeState() sets up thread counts and sets the IsInitialized flag to false
  2. For each hardware thread create two ThreadWorkers (one for processing, one for GUI)
  3. SetInitialized() sets the IsInitialized flag to true

Thread worker initialization sequence

The initialization for the thread worker is handled by its constructor as depicted in the following sequence diagram. The detail of the thread worker's thread function is described in Thread pool task manager: process work item.

mtf-runtime-threadworker-init.png

The initialization sequence consists of the following steps:
  1. InitializeState() initializes counts, flags and the reference to the task manager instance.
  2. The prioritized work queue is created
  3. The work lock and work semaphore are created
  4. The worker thread is created
  5. The worker thread priority is set
  6. The worker thread is started causing its threadWorker() method to execute in the new thread

Last edited Aug 30, 2012 at 10:08 AM by jaorme, version 11

Comments

No comments yet.