Subject: Re: [PATCH 7/6] Enable threaded async procedures whenever pthreads is available

From: Johannes Sixt <[email-masked]>
Date: Tue, 23 Mar 2010 21:25:49 +0100

On Dienstag, 23. März 2010, Johannes Sixt wrote:
> On Dienstag, 23. März 2010, Fredrik Kuivinen wrote:
> > On Wed, Mar 17, 2010 at 22:28, Johannes Sixt <[email-masked]> wrote:
> > > ----------
> > > upload_pack:create_pack_file():
> >
> > ...
> > sha1_to_hex is also called by the parent and the current
> > implementation of that function is not thread-safe. sha1_to_hex is
> > also called by some paths in the revision machinery, but I don't know
> > if it will ever be called in this particular case.
>
> sha1_to_hex is only called by the parent when the async procedure is not
> used.

BTW, the real fix for this potentially problematic case is to teach 
pack-objects to create a pack file for a shallow clone. Then we don't need 
this instance of an async procedure.

-- Hannes