Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129045 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id DCE871A00BC for ; Sat, 1 Nov 2025 19:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762024858; bh=TOjCd2t2WpebhecYr0SYs7glk+yexoQT89lBE43+UOQ=; h=Date:From:To:In-Reply-To:References:Subject:From; b=lqhSWx+RGlq+Gtx9yoCvmaZtu6lKj/QB/hOMm3kVUlnOOGYLJmp0ErifczAhOvJd7 GZmzsjHzRC+/ie3FmL8xPMP4nDC2kbl5XQwM0IyyqKAZhHEv4iElRZnCYMFQ7slJ9A /FSFiak+7ukjNOTS3ya4K7UJa37PHElO3WC/mWEmuVRvEL9Fm0hlR4d3LLGOcQX4ZZ L5GZ1/JUUwnt49vYWzvhcRwjU/90m44N+Zuj0/DFAiz2jq/Z1iF5ImgkeK4lFhGsAE 3FIHQ6qCbo6sgrZlMJ1/Opfj4qD7eQ1KJpkucOvhT3k7dnPjHbSXpQ0nyCGAxY8teT 5XSZeWhNbJ1DQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A6F2E180072 for ; Sat, 1 Nov 2025 19:20:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-a3-smtp.messagingengine.com (fout-a3-smtp.messagingengine.com [103.168.172.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 1 Nov 2025 19:20:57 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id DF1B1EC01D3 for ; Sat, 1 Nov 2025 15:20:51 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Sat, 01 Nov 2025 15:20:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1762024851; x=1762111251; bh=kyIMjsfrsz/8H9Y52dbDA 0VVTJpvnX2609zKsqkzgEM=; b=ZwM/CxwI3X9GRx8GrS7NfouU3ckfv26kNeXJA hn9PWKWrZQqNZS+L37/X77PgvAp9fVXlcCz4CQaXjRxAPo36dEsRvwG30jOmu2cA sLuwrovBNFdOtrmVxigDtW0+kidhvHDZY7IgODmVbs18PzzgsKDkqX8lmw6cApEb obp9iIkWKdd+bcwF8vVCJmpmLk73SSTEkN1LMQGH0JUlg0qrI/oQMIWP0jA2dQWR cZYFH8dVcHXJ10mLiOzvBs7XPJjUfb2Kfm62c4EwAlD7tMF4osET2k64RPwkOiJc zk1/RwMCOZ1Q4YfONMR4KUFTzA5El0vEwp8kZIqaH5dKXCopw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1762024851; x=1762111251; bh=k yIMjsfrsz/8H9Y52dbDA0VVTJpvnX2609zKsqkzgEM=; b=W+qOa/qB+F4yL3Uzz QR3RTAGX3yXMuD03BFscB4AiCM5bWZwOXovFMer6N3629btuQ7jkZSVLa8kdq7Hy ig1w7LP4pvnTM5EbXumYUvy9Yc+tFs0HQqbem0pt+sTqmHi0UTHHmpGTo9BqspYQ +DOIGNHeL1/VzncRfjG71Pyxi3vuC5l5Ef9yE9kkwvyi1AM0qEzD/NwLKyyrSSVN aW0FGvtt7oOssVKZhvt4B8Wkc0QibzzNYZ4tT05fGgzjLW6qlLK0mTEbWedtQ1Cr ZiKSysGlicR2xneP5qFqhpeylsV70Pnh9TEILtgH5JWAss/Q6wp7KVEtvvPQhfjL bjfOQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddujeefvddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthejredtredttdenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeeuvedvudfhffffhfelueehvdejvefgleegteegffetudef leehgeefvdehgeelteenucffohhmrghinhepphhhphdrnhgvthenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghl ughtvggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 88492700054; Sat, 1 Nov 2025 15:20:51 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: A-toUFwMkvUN Date: Sat, 01 Nov 2025 14:20:30 -0500 To: "php internals" Message-ID: <0f38bc1a-ba13-43e1-9ee1-70085e75faa6@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] Polling API Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Thu, Oct 30, 2025, at 4:06 PM, Jakub Zelenka wrote: > Hello, > > I would like to introduce a new polling API RFC that is part of my > stream evolution work: > > https://wiki.php.net/rfc/poll_api > > Kind regards, > > Jakub I freely admit to not being fully versed in this area, so take my feedback with however much sodium chloride you feel is appropriate. - Given that a lot of people reading this are probably no more versed in kernel IO polling than I am, a section early on explaining the context of what is even being discussed would be most appreciated. - I really would rather not add more global constants. Better to at minimum make them class constants of a class that the new API provides. (Maybe PollHandle?) - Conversely, I'm unclear why the PollBackend is an enum. That implies the list of backend implementations is fixed and immutable, and not extensible now or in the future. I find that claim suspect, as there are six already. (I find that following the 0-1-many rule in most cases pays off in the long run.) - PollWatcher is created only by PollContext. OK, then please list PollContext first so that reading PollWatcher I have the, er, context for where it fits. - Speaking of, when there's very long code blocks like this I much prefer to break it up to a block per class, so as to minimize codeblock scrolling. That makes it much easier to read and jump around as I figure out how it all works. - How would requesting a specific poll backend be helpful, if it varies by OS? If I'm running on Windows, asking for the Linux backend wouldn't help me much, or vice versa. I don't see the use case here. (Ie, please describe the use case in more detail.) - Who is the target audience for this? I'm pretty sure it's not anything I normally work on, so it's hard for me to judge if certain decisions are good, bad, or "sucky but we have to." Eg, getData() returning "who the hell knows" strikes me as a footgun in waiting, but I don't have enough context to know if that's an inherited problem from elsewhere. Overall, I think my biggest feedback is "please explain better why any of this matters, because I assume it does somehow but don't understand how from the RFC." --Larry Garfield