Sujet : Re: best approach for multithreading (?)
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 01. Dec 2024, 16:54:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20241201074928.161@kylheku.com>
References : 1 2 3
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-12-01, Lew Pitcher <
lew.pitcher@digitalfreehold.ca> wrote:
On Sun, 01 Dec 2024 15:10:03 +0000, candycanearter07 wrote:
There's a standard library for multithreading.
https://www.man7.org/linux/man-pages/man7/pthreads.7.html
>
Since C11, the C standard library has provided it's own support for
threading, which (I'm told) closely resembles the POSIX threading
model implemented in the Linux pthreads library.
Yes; they stupidly took a chunk of POSIX (IEE 1003 standard, originally
formed as a fork of C to standarize Unix things) and cloned an
incompatible version with different types and function names.
For over a decade before that, people were already using POSIX threads
on platforms that don't have POSIX threads, via libraries.
That's an excellent solution that moves out of the way on platforms
where you do have POSIX threads.
Standards cribbing from other standards, and changing things, is totally
counterproductive.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca