Department of InformatiX
Microsoft .NET Micro Framework Tools & Resources
Core (2)
WPF (1)
Networking (4)
Emulators (2)
Port specifics


Everything about synchronization and threads can be found on the Threading in C# web by Joseph Albahari. Not all described classes are available in the .NET Micro Framework, but the ones which are, works the same.
Be sure to read Thread Management In the .NET Micro Framework post by Igor Grebnev as well, where he mentiones important aspects of multi-threading in .NET Micro Framework.

The hardware does not support multiple threads. How are they managed then?

The CLR (Common Language Runtime) is a single thread from the hardware point of view, and is responsible for creating and managing the threads you know. It switches thread every 20 milliseconds (if not adjusted by priority settings). This period of thread execution is called a time slice.

How are the thread priorities supposed to work?

Igor Grebnev In the .NET Micro Framework, the thread priorities are relative to one another - for example, if the calling thread and the thread being tested are the same, the priority is always ThreadPriority.Normal. For more details, see the Igor's Thread Management post.

Why does not the Thread.Suspend() suspend the thread (immediately)?

James Webster The problem is the suspended thread is moved to the suspended thread pool, but UpdateScheduler is not called immediately, so that thread will not be suspended until something else causes the update to happen. The thread usually continues to run until its time slice expires. That can take up to 20 milliseconds. As a manual work around, you can force the update by calling Thread.Sleep(1) right after Thread.CurrentThread.Suspend();.