Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.c
Subject: Re: best approach for multithreading (?)
Date: Tue, 3 Dec 2024 17:48:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <20241203094647.518@kylheku.com>
References:
<20241201074928.161@kylheku.com>
Injection-Date: Tue, 03 Dec 2024 18:48:04 +0100 (CET)
Injection-Info: dont-email.me; posting-host="ebb36e1dd5eff30b107c6d24fb874840";
logging-data="248801"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aQ50ZUI/ZmyvRxS/SfeSxgX50E6jO5lQ="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:38DGKkMRyauQRiCgHnKf3uTKZbk=
Bytes: 2464
On 2024-12-01, Chris M. Thomasson wrote:
> On 12/1/2024 7:54 AM, Kaz Kylheku wrote:
>> On 2024-12-01, Lew Pitcher 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.
>
> Here is one I used to always use back in the day over on Windows:
>
> https://sourceware.org/pthreads-win32/
And that is not significantly harder to implement (if at all) than C11
threading.
Think about it. The POSIX standard includes ISO C by reference.
So that means POSIX has to have two thread libraries.
It's a waste of flash in embedded systems.
--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca