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 exception is thrown. Note that the value -1 in this parameter 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 exception is thrown. Note that the time that was set in the timeout 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

Exception

The timeout parameter is less than -1.

Exception

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

Exception

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