The Threading Pattern Library helps you build multithreaded applications with fewer lines of code and fewer defects. The library implements threading models (for instance thread unsafe, reader-writer synchronized, actor) and thread dispatching aspects (to background thread, to UI thread).
It provides the following features:
Threading Models. A threading model is a design pattern that gives guarantees that your code executes safely on a multithreaded computer. Seven models are implemented: Thread Unsafe, Thread Affine, Synchronized, Reader-Writer Synchronized, Actor, Freezable and Immutable. See Writing Thread-Safe Code with Threading Models for details.
Thread Dispatching. Custom attributes DispatchedAttribute and BackgroundAttribute cause the execution of a method to be dispatched to the UI thread or to a background thread, respectively. For details, see Dispatching a Method to the UI Thread and Dispatching a Method to Background.