git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Enable index-pack threading in msysgit.

From
Karsten Blees <karsten.blees@gmail.com>
Date
Mar 21, 2014, 18:40 UTC
Message-ID
<532C8793.8050202@gmail.com>
In-Reply-To
<CACsJy8D01gxeSoxgD9QkLgS85B=Af8aXytuqn6CBkF+_7WjZtQ@mail.gmail.com>
Am 20.03.2014 02:25, schrieb Duy Nguyen:
Show 17 quoted lines
> On Thu, Mar 20, 2014 at 4:35 AM, Stefan Zager <szager@chromium.org> wrote:
>> This adds a Windows implementation of pread.  Note that it is NOT
>> safe to intersperse calls to read() and pread() on a file
>> descriptor.  According to the ReadFile spec, using the 'overlapped'
>> argument should not affect the implicit position pointer of the
>> descriptor.  Experiments have shown that this is, in fact, a lie.
>>
>> To accomodate that fact, this change also incorporates:
>>
>> http://article.gmane.org/gmane.comp.version-control.git/196042
>>
>> ... which gives each index-pack thread its own file descriptor.
> 
> If the problem is mixing read() and pread() then perhaps it's enough to do
> 
> output_fd = dup(output_fd);
> 
Unfortunately not, dup() / DuplicateHandle() just opens another handle to the same file object (i.e. sharing the same file position).
Previous: Duy NguyenNext: Marat Radchenko
Message 4 of 5 in “Enable index-pack threading in msysgit.”
  1. Enable index-pack threading in msysgit.Stefan Zager, Mar 19, 2014
  2. Junio C HamanoMar 19, 2014
  3. Duy NguyenMar 20, 2014
  4. Karsten BleesMar 21, 2014
  5. [BUG] 'pread' : macro redefinitionMarat Radchenko, Mar 30, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.