Install Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Creates a subthread within the calling thread, containing a constraint that requires the calling thread to complete an operation within a specified time period and at a specified priority level.
Namespace: Microsoft.SPOT
Assembly: Microsoft.SPOT.Native (in Microsoft.SPOT.Native.dll)
Syntax
'Declaration
Public Shared Sub Install ( _
timeout As Integer, _
priority As Integer _
)
public static void Install(
int timeout,
int priority
)
public:
static void Install(
int timeout,
int priority
)
static member Install :
timeout:int *
priority:int -> unit
public static function Install(
timeout : int,
priority : int
)
Parameters
- timeout
Type: System. . :: . .Int32
The number of clock ticks before a ConstraintException exception is thrown. Note that the value -1 in this parameter indicates that the current constraint exception is to be uninstalled.
- priority
Type: System. . :: . .Int32
The priority level of the calling thread.
Exceptions
Exception | Condition |
---|---|
Exception | The timeout parameter is less than -1. -or- The system is unable to identify the thread that is installing this constraint. -or- The thread installing this contraint does not own the subthread that the constraint applies to. |
Remarks
If the specified time period expires before the thread has completed the operation, a ConstraintException exception is thrown. Note that the time you set in the timeout parameter is standard clock time, not thread execution time.
You can raise the priority level only for threads that already have a priority level higher than 0 (zero).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.