John E. / TDM wrote:
>  On 8/24/2010 3:24 PM, Ruben Van Boxem wrote:
> > I think there needs to be some code written to link win32-pthreads
> > to the gcc std::thread API, just like OpenMP also uses
> > win32-pthreads. Is this line of thought correct?
>
>  This is correct -- and also extremely inconvenient. It would probably
>  be quite simple to let the std::thread API use pthreads-w32 on
>  Windows, but unfortunately this would add a direct dependency of
>  libstdc++ on pthreads-w32, which has two extreme ramifications:
>
>  * Every C++ program would require the pthreads-w32 DLL to be
>  distributed with it.

You mean every thread enabled program would need to distribute it, 
correct?  Wouldn't libstdc++ be coded to be conditionally dependent on 
the threads library if it were available?  Is this any different than 
Linux where pthreads is common?

>  * Every C++ program would thereby require the
>  entire pthreads-w32 source code to be distributed with it, due to
>  clause 4 of the LGPL.
>

Doesn't it just say you have to have the source code available for 
delivery in the same manner as the binary in the event someone asks for 
it?  Although it is usually good advice to distribute the source for the 
binary with the binary to avoid having to store the source for X period 
of time.

>  I deem it acceptable for the use of OpenMP create a dependency on
>  pthreads-w32; I do *not* deem it acceptable for every C++ program to
>   have that dependency.
>

I see no harm in a C++ program using std::thread to require pthreads-w32.

>  It would be far preferable to me for someone to extend GCC to use
>  Win32 gthreads for std::thread.
>

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.

Earnie

P.S. The w32 and Win32 speak needs to be modified to be Windows.


------------------------------------------------------------------------------
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

Reply via email to