IPredModelBuilder::get_Priority, put_Priority

Ee811606.c++_off(en-US,CS.10).gifEe811606.vb_on(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

Get method:

HRESULT IPredModelBuilder::get_Priority(longlBuildID,ePredBuildPriority*pePriority);

Put method:

HRESULT IPredModelBuilder::put_Priority(longlBuildID,ePredBuildPrioritypePriority);

Parameters

lBuildID

[in] A long that contains the build identifier.

pePriority

[in] When putting the property, an ePredBuildPriority enumerated priority level.
[out, retval] When getting the property, a pointer to the ePredBuildPriority enumerated priority level for the build.

Return Values

These methods return an HRESULT indicating whether they completed successfully. See the following Error Values section for more details.

Error Values

These methods return S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return 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.

The pePriority parameter contains valid data only if the property is accessed successfully.

See Also

PredModelBuilder Object

IPredModelBuilder Start

IPredModelBuilder Pause


All rights reserved.