Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Initially, the main thread validates all input parameters. If any issues arise, it generates an error message and terminates.

Once all parameters pass validation, the main thread deactivates cube logging for the target cube, a task specifically assigned to the main thread to avoid potential locking problems.

The main thread then determines if parallel execution is required by verifying if pMaxThreads > 1.

If parallel execution was required, the main process is spawning all the child threads by executing RunProcess sets up the }APQ C3 Thread Control cube for thread status monitoring. This involves clearing a specific cube slice based on the current user and current process and setting the status of all child threads to Scheduled. The main thread (pThreadID = 0) is marked as Scheduled and Running, but not Completed.

Following this, the main thread spawns all child threads using the RunProcess command with the same process name, . The pThreadID of for each thread is assigned in range designated a value ranging from 1 to the pMaxThreads parameter value. All other parameter values are passed to the child threads unchangedparameters remain unchanged for the child threads.

Based on settings in }APQ Settings, the main thread either transitions directly to the thread monitoring loop in the epilog or begins its data processing task. Once it has completed data processing, it moves to the thread monitoring loop in the epilog.

If parallel execution wasn't required, the entire data processing occurs in a single-threaded mode, solely handled by the main thread.