Programmatically find the number of cores on a machine Programmatically find the number of cores on a machine multithreading multithreading