Are POSIX threads only for Unix and Solaris machines or can they be run in the windows enviroment. Is this a good route to take for a multithreading application or would you recommend something else?
Are POSIX threads only for Unix and Solaris machines or can they be run in the windows enviroment. Is this a good route to take for a multithreading application or would you recommend something else?
chris
Don't crosspost, it's against the rules. I already answered your first question in the other thread which I will now close.
As for which is better, a pThreads library or the native threading model, there is no simple answer. If you know pThreads, then the learning curve to multithreading on Windows disappears, but since the library will be a wrapper around the native system of calls, there will be a performance hit which would not be there using the native model.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Thanks for the response. I didn't relieze I was "double posting" I was just looking for other suggestions from the windows board like you mentioned, sorry and Thanks again.
do you know a good source for general information on the "native" threading approach that you mentioned?
chris
>>> I didn't relieze I was "double posting"
You're new, you've learnt. Good enough. There are a few board rules, they are posted at the top of each forum. They are basically common sense, and if you are sensible, you'll not find them restrictive.
>>> good source for general information on the "native" threading
Your ever available MSDN!
If you are coming to Windows from a *NIX or Linux, it is worth browsing MSDN's library. It is huge, and sadly, not laid out terribly well, but it is updated frequently, and once you know how to navigate it, is a superb resource.
I routinely multithread my apps, (always with Win32 functions), and so do a few other on this board. We try to please.
(I have used pThreads on other platforms, so may be able to give you a shove in the right direction if you need the "Windows equivalent of" a pThreads call - however, the model is a little different, so not everything translates).
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Search this board, there is source code posted.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }