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
intThe 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
intThe 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).