PredModelBuilder.Priority

Ee811605.c++_on(en-US,CS.10).gifEe811605.vb_off(en-US,CS.10).gif

The Priority property is a read/write ePredBuildPriority enumerated type. This property stores the priority of a build thread.

Definition

Property Priority(lBuildID As Long) As Enum

Parameters

lBuildID

[in] A Long that contains the build identifier.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

Change this property to raise or lower the priority of the build thread depending on how quickly the build is needed.

The following table defines the possible values for the ePredBuildPriority enumerated priority levels. Absolute thread priority is not supported. These priority values are relative to the spawning thread.

Name Value Description
PriLowest -2 Lowest priority.
PriBelowNormal -1 Lower priority.
PriNormal 0 Normal priority.
PriAboveNormal 1 Higher priority.
PriHighest 2 Highest priority.

Initiate the build thread with the Start method before you access the Priority property.

Use the Pause method to temporarily suspend execution of equal or higher priority threads when a particular build thread is time-critical. Threads are executed round robin for each priority level. Threads with lower priorities are not executed until all the threads with a higher priority have executed.

See the Microsoft Developer Network (MSDN) documentation for the system SetThreadPriority method for more information about thread scheduling.

The Priority method does not support the THREAD_PRIORITY_REALTIME priority.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

PredModelBuilder Object

PredModelBuilder.Start

PredModelBuilder.Pause


All rights reserved.