Re: [PATCH 22/40] Windows: Implement asynchronous functions as threads.
- From
Johannes Sixt <johannes.sixt@telecom.at>
- Date
- Feb 28, 2008, 21:01 UTC
- Message-ID
- <200802282201.06802.johannes.sixt@telecom.at>
- In-Reply-To
- <alpine.LSU.1.00.0802281525510.22527@racer.site>
On Thursday 28 February 2008 16:28, Johannes Schindelin wrote:
Show 16 quoted lines
> Hi, > > On Wed, 27 Feb 2008, Johannes Sixt wrote: > > In upload-pack we must explicitly close the output channel of rev-list. > > (On Unix, the channel is closed automatically because process that runs > > rev-list terminates.) > > When I read this patch, my impression was that it litters the source code > with #ifdef's. IMO this makes the code less readable, and as a > consequence easer to fsck up. > > Unfortunately, I have no idea how to help that, other than implementing > compat/thread.[ch], abstracting the thread functions, and introducing a > NO_FORK Makefile variable and preprocessor constant. > > Hmpf.
The number of #ifdef/#endif is already at a minimum unless you are willing to have entire functions in separate #ifdef/#else/#endif branches. Whether to have compat/thread.[ch] or not is just a question of whether you want to have asynchronous functions in threads also on Unix or not.
-- Hannes