Sujet : Re: Threads across programming languages
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.lang.c++ comp.lang.cDate : 04. May 2024, 05:34:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v14dtd$1195j$2@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
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-funchttps://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptexhttps://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectexhttps://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-transmitfilehttps://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_transmitpacketsI used to use them all the time back in the day.