Skip to main content

Multithreading

Docs under migration

These docs are under active migration and updates. The original docs will remain available at docs.ghielectronics.com for future reference.

TinyCLR OS is a single process system, only running your application. This is in fact a good security feature! However, TinyCLR OS supports threading similar to full .NET.

void Blinker() {
// LED on
Thread.Sleep(100);
// LED off
Thread.Sleep(100);
}

var t = new Thread(Blinker);
t.Start();
// do secondary task
Thread.Sleep(Timeout.Infinite);