Deutsch English Français Italiano |
<v14dtd$1195j$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Threads across programming languages Date: Fri, 3 May 2024 21:34:53 -0700 Organization: A noiseless patient Spider Lines: 34 Message-ID: <v14dtd$1195j$2@dont-email.me> References: <GIL-20240429161553@ram.dialup.fu-berlin.de> <RPidnQT6TOLEU7L7nZ2dnZfqnPWdnZ2d@giganews.com> <v14dke$1196p$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 04 May 2024 06:34:53 +0200 (CEST) Injection-Info: dont-email.me; posting-host="00566bb81b0a3452542610785f934900"; logging-data="1090739"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xcplfN77kV6RhJy2GjRpCaUxOUAWxRyg=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:aJLIrSHg+pJ9tSnfkJQeRAoZMmc= Content-Language: en-US In-Reply-To: <v14dke$1196p$3@dont-email.me> Bytes: 2367 On 5/3/2024 9:30 PM, Chris M. Thomasson wrote: > On 4/29/2024 9:44 AM, Ross Finlayson wrote: > [...] > > Have you ever read the following paper? Pretty nice! > > https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2001-39.pdf > > If not, read all... There is a way to do a little sort, gain a cohort and execute it. For instance all reads, writes, connections, accepts are all organized in a cohort. Instead of processing a read, write, read, read, write. Say: read, read, read, write, write To get better locality. I remember some functions on winnt. AcceptEx, ConnectEx, TransmitFile, TransmitPackets, ect... ;^) The main thing to use to wait on io completions: https://learn.microsoft.com/en-us/windows/win32/fileio/getqueuedcompletionstatusex-func https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-transmitfile https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_transmitpackets I used to use them all the time back in the day.