Re: [PATCH 1/1] MSVC: port pthread code to native Windows threads
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Nov 4, 2009, 08:24 UTC
- Message-ID
- <4AF13A4F.5070300@viscovery.net>
- In-Reply-To
- <16cee31f0911032344m3263730l607c02eb4e9adef5@mail.gmail.com>
[please don't cull Cc list on this ML]
Andrzej K. Haczewski schrieb:
Show 6 quoted lines
>> Pardon my ignorance, but is there a reason to not use Pthreads for Win32? >> http://sourceware.org/pthreads-win32/ >> > > Not using pthreads on Windows makes Git: > 1. faster on that platform
I believe this only if you present hard numbers. My guess is that (for example) packing objects with two threads is still faster with a slow pthreads emulation than without threading at all.
> 2. not depend on Pthreads for Win32
Why is this an advantage?
> IMHO that makes Git one step closer to become native on Windows, and > is a sensible step.
Emulating pthreads on Windows with all its facets is an extremely difficult task. If exact POSIX conformance is needed, I would choose an existing package over doing it myself at any time.
Granted, we don't need the esoteric parts (cancelation points), which would simplify the emulation a lot. But, as I pointed out in my other mail, even a pthread_cond_wait() is not that trivial to implement with the Windows API.
-- Hannes