“Set” Test Functions
Use the following functions at run-time to determine whether the current environment allows you to set the corresponding thread attribute value:
*canSetConcurrencyPolicy(RWConcurrencyPolicy)
*canSetContentionScope(RWContentionScope)
*canSetInheritancePolicy(RWInheritancePolicy)
*canSetPriority()
*canSetProcessScopePriority()
*canSetSchedulingPolicy(RWSchedulingPolicy)
*canSetStackCommitSize()
*canSetStackReserveSize()
*canSetStartPolicy(RWStartPolicy)
*canSetSystemScopePriority()
*canSetTimeSliceQuantum()
*canSetUserStack()
These functions return one of the following values:
*false if the corresponding attribute is not supported in the current environment or if the specified attribute value (if any) is not supported under current circumstances.
*true if the corresponding attribute is supported in the current environment and the specified value (if any) is legal the under current circumstances.
Each of these functions that accepts a policy value produces an RWTHRBoundsError exception if the value specified as an argument is not legal policy value for that attribute. This exception can be avoided by making sure that you are using the appropriate enumerated value names for each attribute.
Once a thread has been created and is active, you can use the following RWThread or RWThreadSelf functions to test whether or not you can change the corresponding attribute value for an active thread:
*canSetPriority()
*canSetProcessScopePriority()
*canSetSchedulingPolicy(RWSchedulingPolicy)
*canSetSystemScopePriority()
*canSetTimeSliceQuantum()