From: Johannes Sixt Date: Thu, 28 Feb 2008 21:01:06 GMT Subject: Re: [PATCH 22/40] Windows: Implement asynchronous functions as threads. Message-ID: <200802282201.06802.johannes.sixt@telecom.at> In-Reply-To: On Thursday 28 February 2008 16:28, Johannes Schindelin wrote: > 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