Hello All - On Wed, Aug 25, 2010 at 8:34 AM, John E. / TDM <[email protected]> wrote: > On 8/25/2010 5:29 AM, Earnie wrote: >> John E. / TDM wrote: >>> * Every C++ program would require the pthreads-w32 DLL to be >>> distributed with it. >> ... >> Why not code pthreads to use Windows gthreads? It would get wider >> acceptance in GCC if the library normally used for threading with GCC >> is used for the implementation. > > "gthreads" is just a few source files in GCC that create a > platform-independent interface for GCC's threading functions. It wraps > pthreads on POSIX platforms, and WinAPI threads on Windows. >
This is speculation, and/or an ignorant question on my part... If "gthreads" already wraps windows threads (per John), and gcc's std::thread is implemented using gthreads (speculation due to the "#if defined(_GLIBCXX_HAS_GTHREADS)" wrapper in gcc's thread header file), then perhaps it would be relatively straightforward to try to get std::thread working with mingw gcc. When I saw the _GLIBCXX_HAS_GTHREADS preprocessor flag in gcc's std::thread, I assumed (without further investigation) that "gthreads" was a linux-specific set of thread utilities used by gcc (for no obvious reason) instead of pthreads. If someone has already wrapped windows and posix threads in a cross-platform "gthreads" (I assume that this is what John's comment means.), and gcc's std::thread is implemented on top of gthreads, then it would seem that we're already 90% there. Does this make sense, or have I misunderstood what's going on here? Thanks. K. Frank > -John E. / TDM ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
