View Full Version : Using multiple threads with C++
Feb 20, 2007, 11:37 PM
I recently purchased a macbook Pro, and I would like to make use of the second CPU in my C/C++ programs. Could someone point me to a source for spawning threads using C/C++ on a mac? I do a lot of monte carlo simulations, and I would like to make use of the second cpu.
Feb 21, 2007, 05:23 AM
There is something called Berkeley UPC (Unified Parallel C) over on the Apple download page under development tools. I've not tried it but I'd be interested in your thoughts if you do. Other than that I guess 'man fork'!
b e n
Feb 21, 2007, 07:15 AM
Just use plain old posix threads if you want to use C
For c++ well you can wrap the pthreads or use the boost library, which has a nice oo threading API
Good luck :)