On 2013/01/10 11:06, Denis Krjuchkov <de...@crazydev.net> wrote: > As I've saw in git MPD is still going to use GLib's mutex/condvar > implementations for Windows.
Actually, I'd love to use std::mutex et al, but that's not available on the mingw-w64 version shipped in Debian. I could try a newer version, but my goal is to make it buildable with Debian tools. However the Linux port of MPD doesn't use std::mutex because it (the GNU libstdc++ implementation) adds overhead. The lock() method needlessy checks the return value and throws an exception on error, even when exceptions are disabled. Very small overhead, but still unnecessary. > May be we could just take pthreads-win32 instead? > > http://sourceware.org/pthreads-win32/ That would be another dependency, wouldn't it? Yes, we could do that. My rationale for removing GLib was to make porting to Android possible, and therefore GLib will be removed from the normal Linux build first. Removing it from Windows is not my goal, but pthread-win32 sure could help with that. Another idea I had was use the native WIN32 condition variables, which requires Windows Vista or newer. I'm not sure if that's a problem. I mean, Windows XP is 13 years old and its support will finally expire in just a few months. http://msdn.microsoft.com/en-us/library/windows/desktop/ms682052.aspx This will be less overhead than pthreads-win32, because it doesn't attempt to emulate a foreign API. (Next problem is that the prototypes for this API are not available in Debian's mingw-w64 *sigh*) Max ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team