Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" Newsgroups: comp.lang.c Subject: Re: Python recompile Date: Fri, 14 Mar 2025 12:48:19 -0700 Organization: A noiseless patient Spider Lines: 23 Message-ID: References: <20250309012626.00001276@yahoo.com> <20250310135828.116@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 14 Mar 2025 20:48:19 +0100 (CET) Injection-Info: dont-email.me; posting-host="20df43b50ab9261545a619b97260a04e"; logging-data="2041158"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mWjjMECWbJxKw9huClGSzj6EJ1Gu6Cqk=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:oYM7PdgMG4y4YAp2nLhqRIq2MsI= Content-Language: en-US In-Reply-To: Bytes: 3246 On 3/14/2025 12:46 PM, Chris M. Thomasson wrote: > On 3/13/2025 6:48 PM, Lawrence D'Oliveiro wrote: >> On Thu, 13 Mar 2025 16:45:28 -0700, Chris M. Thomasson wrote: >> >>> I have no idea how the Python dev's use IOCP with sockets. >> >> They can’t figure out a way to support file I/O notifiers (of the kind >> commonly used with event loops) with it. If you know of a way to do it, >> please tell us. > > Well, usually, iirc, been a while, when GQCSEX returns we take the > WSAOVERLAPPED and convert it to our extended structure. Basically > similar to how Linux uses offsetof to extend node structures, or on > Windows CONTAINING_RECORD, then we can use that to pass into a function > called on_read, on_write, on_accept, on_connect, ect... type of > functions. Now, this is an interesting point. I remember where calling > the event handler in an IO thread can be an issue if its going into > "generic" user code. So, sometimes I would pass the events to another > lock-free queue/stack, whatever so the "logic" threads get to work on > it. The logic threads are different than the IO threads. You don't want to use a separate IOCP for the "logic" threads because it uses non-paged memory. So, a lock-free queue/stack is the way to go.