From: K. F. <kfr...@gm...> - 2010-06-01 15:25:43
|
Hi Tatsh - On Tue, Jun 1, 2010 at 5:01 AM, Tatsh <dd...@gm...> wrote: > > K. Frank wrote: >> >> How might I best approach multi-threaded programming with mingw32? >> I'm looking for a balance of ease of getting started and functionality / >> stability. >> ... >> mingw32-pthreads-w32 <-- *** should I try using this? *** >> ... > I have a little info on this on the Gentoo wiki. Native calls are perfectly > fine (except for probably some very new ones). However, if you plan to port > your app to POSIX environments (including OS X), right now pthreads-win32 will > cover almost all bases then you won't even have to blink for the most part > when it comes to building for other OS's. I think I will try starting with a pthreads wrapper for convenience and familiarity. > ... > You can work with that to get pthreads-win32 installed on a Windows install > just as much. What precisely is mingw32-pthreads-w32 (mentioned in my original posting)? Is it the same as the pthreads-win32 you mention, but maybe "cerified for use" with mingw32? > Just treat your MSYS environment like a 'real' UNIX environment. I am hoping not to have to use the MSYS environment. (I don't have any particular desire to emulate unix -- cmd.exe and notepad work pretty well for me.) Is use of pthreads-win32 somehow ties to MSYS? I am hoping for a minimal setup in which I can add some headers to me include path and a library or dll to my library path, but otherwise just run g++ from the command line. I don't really understand what MSYS is and what interdependencies it has. Would it be possible (and sensible) to just download mingw32-pthreads-w32, unzip it, add a few headers to my path, and start building pthreads programs with mingw's g++? > There are other options for portable threads too, such as QThread (from Qt), > Boost::thread, and OpenMP. (Yes, I'm doing some Qt programming, but I want to play around with some multi-threaded programming without the bulk of the Qt framework and the Qt-ishness of the QThread api.) I skimmed the Boost.Thread documentation. I'm confused. I thought that Boost was supposed to be standard C++ and not platform specific. Since C++ (currently) makes no reference to threads, how can Boost provide thread capabilities without drilling down to native os calls, and having to provide different versions for different platforms? I didn't notice anything in the documentation about platform dependence or supported platforms. >> ... > -- > Tatsh Thanks. K. Frank |