Table of Contents

Class ExecutionConstraint

Namespace
nanoFramework.Runtime.Native
Assembly
nanoFramework.Runtime.Native.dll

Provides a method to require a thread to complete an operation within specific constraints.

public static class ExecutionConstraint
Inheritance
ExecutionConstraint
Inherited Members

Methods

Install(int, int)

Creates a sub-thread 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.

public static void Install(int timeoutMilliseconds, int priority)

Parameters

timeoutMilliseconds int

The number of milliseconds before a ConstraintException is thrown. A value of -1 indicates that the current constraint exception is to be uninstalled.

priority int

The priority level of the calling thread.

Remarks

If the specified timeout expires before the thread has completed the operation, a ConstraintException is thrown. Note that the time specified in the timeoutMilliseconds parameter is standard clock time, not thread execution time. The priority level can only be raised for threads that already have a priority level higher than 0 (zero).

Exceptions

ArgumentOutOfRangeException

Thrown if timeoutMilliseconds is less than -1.

InvalidOperationException

Thrown if the system is unable to identify the thread that is installing this constraint.

InvalidOperationException

Thrown if the thread installing this constraint does not own the sub-thread that the constraint applies to.