On Wed, Oct 26, 2016 at 12:51:02PM -0700, Stefan Beller wrote: > > I seem to recall this does not work on Windows, where the pthread > > functions are thin wrappers over CRITICAL_SECTION. Other threaded code > > in git does an explicit setup step before entering threaded sections. > > E.g., see start_threads() in builtin/grep.c. > > > > I wonder if we can have a similar thing as > http://stackoverflow.com/a/9490113 in compat/win32/pthread.{h.c} as it is > very convenient to not have to explicitly initialize mutexes? I agree it would be much more convenient and get rid of some repetitive boilerplate code. I'll leave it to Windows folks to decide if they are OK with that approach or not (I do not offhand know of any reason it would not work). -Peff