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

Re: [PATCH] compat: Allow static initializer for pthreads on Windows

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 27, 2016, 18:49 UTC
Message-ID
<xmqqr3716301.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<34c88c40-2088-fd74-5d26-56c0599b7eb9@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 15 quoted lines
> Am 27.10.2016 um 19:01 schrieb Stefan Beller:
> ...
> It is not possible to mark a mutex uninitialized on Windows without an
> extra piece of data. A solution would become quite complicated quite
> quickly, and at the cost of additional operations that are in the same
> ballpark as an uncontended mutex. I'm not enthused.
>
>> The positive aspect of this way the patch proposes would be that any
>> future contributor not knowing the details of how to do mutexes right
>> on Windows, would not totally break the whole system, i.e. this seems
>> to be more maintainable in the future as it reduces the friction between
>> pthreads mutexes and the way we can do things in Git in a platform
>> independent way
>
> This is a non-argument. Coders have to know their tools.

The codebase should strive to give coders a coherent abstraction that can be implemented efficiently on platforms, so that coders do not have to care too deeply about quirks that exist on individual platforms.

It is OK to argue that the particular solution Stefan lifted from somewhere (perhaps msdn article he cited???) does not qualify as such an abstraction. But I do not agree with your "Coders have to know" as a blanket statement.

Previous: Johannes SixtNext: Stefan Beller
Message 12 of 28 in “compat: Allow static initializer for pthreads on Windows”
  1. compat: Allow static initializer for pthreads on WindowsStefan Beller, Oct 26, 2016
  2. Stefan BellerOct 26, 2016
  3. Johannes SixtOct 27, 2016
  4. Junio C HamanoOct 27, 2016
  5. Johannes SixtOct 27, 2016
  6. Junio C HamanoOct 27, 2016
  7. Johannes SixtOct 27, 2016
  8. Junio C HamanoOct 27, 2016
  9. Stefan BellerOct 27, 2016
  10. Jeff KingOct 27, 2016
  11. Johannes SixtOct 27, 2016
  12. Junio C HamanoOct 27, 2016
  13. Stefan BellerOct 27, 2016
  14. Johannes SixtOct 27, 2016
  15. Jacob KellerOct 27, 2016
  16. Stefan BellerOct 27, 2016
  17. Johannes SixtOct 28, 2016
  18. Jacob KellerOct 28, 2016
  19. Philip OakleyOct 28, 2016
  20. Jacob KellerOct 28, 2016
  21. Johannes SchindelinOct 28, 2016
  22. Jacob KellerOct 28, 2016
  23. Johannes SixtOct 28, 2016
  24. Junio C HamanoOct 28, 2016
  25. Stefan BellerOct 28, 2016
  26. Junio C HamanoOct 28, 2016
  27. Johannes SixtOct 28, 2016
  28. Junio C HamanoOct 28, 2016

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.