# Multi-Threading

There is a general, "golden rule" to follow for multithreading: Only one thread per physical processor core can be running at any point in time. Therefore, a thread can only run on a single core, and cannot be spread across multiple cores.

The Windows OS does a good job of organizing threads onto separate cores, but is not guaranteed, due to the workload and load balancing required by the system.

Using multithreading does not always translate into faster performance. There are overheads associated with creating the multiple threads, and joining them back to the original thread.

Use the $System.InvokeAsync method sparingly. The purpose of this method is to allow you to run asynchronous methods from the UI, to prevent blocking and/or freezing the UI. Too many $System.InvokeAsync methods can slow down the Processing Parallel Regions.

Note: For more information, see the Microsoft Developer Network topic on Task Parallel Library (TPL).