Hi Paul,

> > That is, the install_sigpipe_die_handler comment should say simply "This 
> > function should not be called in a multithreaded process."
> 
> Well, perhaps that'd be too terse. After I looked into the terminology 
> discrepancies between POSIX and Gnulib's doc/comments, I came up with 
> the attached wordier patch which I installed. Comments welcome.
> 
> This patch changes the install_sigpipe_die_handler wording to "This 
> function should be called only in single-threaded processes. In a 
> multithreaded program, this function is typically called early in the 
> main thread while the process is still single-threaded." I hope this 
> wording both captures the intent of the old wording, and is more 
> consistent with POSIX terminology and with actual use.

Yes, that's a good balance. Thinking about a "multithreaded process"
is useful when considering a single function call or, more generally,
something that occurs at a certain time. Whereas thinking about a
"multithreaded program" is useful when arguing about whether a function
may be used in a certain program at all. But because readers may not
pay close attention to which word is used ("process" vs. "program")
it is worth explaining both perspectives when relevant.

> Change “multithread-safe” to “thread-safe”.

Indeed, it appears that "thread-safe” is widely used [1].
Personally, I use "multithread-safe" because it is often abbreviated
as "MT-safe" [2][3] — an abbreviation that is obscure when you never say
"multithread-safe".

> do not change “multithreaded” to “multi-threaded”

Yes, that would be an annoying spelling, because
  - one would have to write "multi-thread-safe",
  - we write "multibyte" without a hyphen in many places.

Bruno

[1] https://en.wikipedia.org/wiki/Thread_safety
[2] https://man7.org/linux/man-pages/man3/free.3.html
[3] https://docs.oracle.com/cd/E86824_01/html/E54776/attributes-5.html




Reply via email to