From: Fredrik Kuivinen Date: Tue, 23 Mar 2010 21:42:46 GMT Subject: Re: [PATCH 7/6] Enable threaded async procedures whenever pthreads is available Message-ID: <4c8ef71003231442j30618489n226dd16d4033c3fb@mail.gmail.com> In-Reply-To: <201003232119.19430.j6t@kdbg.org> On Tue, Mar 23, 2010 at 21:19, Johannes Sixt wrote: > On Dienstag, 23. März 2010, Fredrik Kuivinen wrote: >> On Wed, Mar 17, 2010 at 22:28, Johannes Sixt wrote: >> That xmalloc and xrealloc aren't thread-safe feels a bit fragile. >> Maybe we should try to fix that. > > The point of this assessment was to find out whether this is necessary (and > whether something else that is not thread-safe is used). It may not be necessary now, but my point was that by having thread-unsafe xmalloc and xrealloc it is a bit too easy to introduce new bugs. >> > ---------- >> > 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. Yes, you are right. - Fredrik