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

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

From
Fredrik Kuivinen <frekui@gmail.com>
Date
Mar 23, 2010, 21:42 UTC
Message-ID
<4c8ef71003231442j30618489n226dd16d4033c3fb@mail.gmail.com>
In-Reply-To
<201003232119.19430.j6t@kdbg.org>
On Tue, Mar 23, 2010 at 21:19, Johannes Sixt <j6t@kdbg.org> wrote:
> On Dienstag, 23. März 2010, Fredrik Kuivinen wrote:
>> On Wed, Mar 17, 2010 at 22:28, Johannes Sixt <j6t@kdbg.org> wrote:
Show 5 quoted lines
>> 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.

Show 9 quoted lines
>> > ----------
>> > 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
Previous: Johannes Sixt
Message 16 of 16 in “Pass t5530 on Windows”
  1. 0/6 Pass t5530 on WindowsJohannes Sixt, Mar 6, 2010
  2. Junio C HamanoMar 6, 2010
  3. Shawn O. PearceMar 6, 2010
  4. 7/6 Enable threaded async procedures whenever pthreads is availableJohannes Sixt, Mar 9, 2010
  5. Shawn O. PearceMar 9, 2010
  6. Junio C HamanoMar 10, 2010
  7. Johannes SixtMar 11, 2010
  8. Junio C HamanoMar 12, 2010
  9. Johannes SixtMar 17, 2010
  10. Junio C HamanoMar 17, 2010
  11. Fredrik KuivinenMar 23, 2010
  12. Johannes SixtMar 23, 2010
  13. Johannes SixtMar 23, 2010
  14. Junio C HamanoMar 23, 2010
  15. Johannes SixtMar 23, 2010
  16. Fredrik KuivinenMar 23, 2010

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.