Property Priority
Namespace: Belay.Attributes
Assembly: Belay.Attributes.dll
Priority
Gets or sets the priority level for thread execution. Higher priority threads may receive more CPU time on capable platforms.
csharp
public ThreadPriority Priority { get; set; }
Property Value
Examples
[Thread(Priority = ThreadPriority.High)]
public async Task StartSafetyMonitorAsync()
{
// High priority for safety-critical monitoring
await ExecuteAsync("start_safety_monitor_thread()");
}
[Thread(Priority = ThreadPriority.Low)]
public async Task StartDataLoggerAsync()
{
// Low priority for background logging
await ExecuteAsync("start_logging_thread()");
}
Remarks
Thread priority is a hint to the MicroPython scheduler and may not be supported on all platforms. Use primarily for documentation and future platform compatibility.
Priority guidelines:
- : Background tasks, logging
- : Standard monitoring, periodic tasks
- : Time-critical operations, safety systems