Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128911 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 27F771A00BC for ; Wed, 22 Oct 2025 18:42:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761158573; bh=IBn3CxjQUn2DZbydtPqEvq7Nj5O4WzH2BYiJzE6x7Bc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=OWBqHbacIBbxtKG7Y0YSRrCqhXYl9eLgNftFggU+QOHvd4MFBhsDSN62htRR3vZWY 1wpQmIjkuI+Aaor4E4NJ6enE+nq9qE5j+DzacO6zoRIuQ8XTYJfGch6keBwSOtZ3oL A6PlcUvgmP/YiDNsGZ3Mj2kpI1NxFA6fKzZCZiJYQ91A88AhQP19t3GTK7GMp5XWAH 5WvpOFBO2c9h3z2lvtOM6YYPQdtSzKF9syLt5aM3VHlxoqQoqPsp8Y2ofv7upbkcON 2WmNBLHrW/DD2fHhkTWct6IAZFx6HzknCRf+mED/vdzBQIkjZE0fMc0YJsnDAj7ENS VJounKprp4aYA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 838B118033A for ; Wed, 22 Oct 2025 18:42:52 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.155]) (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 ; Wed, 22 Oct 2025 18:42:52 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 9352720A870A for ; Wed, 22 Oct 2025 20:42:45 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass reason="pass (just generated, assumed good)" header.d=alec.pl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alec.pl; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :mime-version:date:date:message-id:received:received:received; s=dkim2; t=1761158564; x=1762972965; bh=QEOsFrJIryEedJJq1rb292A 5Vet8mZvaH90bEfwc298=; b=lxrRP0z3lIt5NuSGoEIprCeerveypjiC+Xinhbl BiVJPZFXRpTcUMA9JDdO/sDa/vXEHFK4TRNObYqyvPErT5gRSatDUmKctKasxmfe aQ/uxoMZtDYDxnhmzig6NxLeeSSE+wWHI/5ro1vHjv2pIrJEN4zSRGIIZtxsP5Ep sRgH2qVP7F/sRreFxB6bxGB0zNa/n4IG1ZAtaibmQk7Yx3lmikAbZAbYhYot2t6Y TdiV0A0lAJ0jMko7vZ9UdQG2cJb79hFsnyFm+PEw1iGdy/B5vEaVU+YmJxSIlQZQ RAHVJ81qBMhTKvV3f/MS5lxhUCn0RxRkc0b2RUZc9reeDaQ== X-Virus-Scanned: amavis at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id 4yvA0KcrmUrB for ; Wed, 22 Oct 2025 20:42:44 +0200 (CEST) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id 4552420A9E87 for ; Wed, 22 Oct 2025 20:42:44 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id 1612C323EF15 for ; Wed, 22 Oct 2025 20:42:44 +0200 (CEST) Message-ID: <27dc6a60-229c-42b5-8f2f-e8fc938945ad@alec.pl> Date: Wed, 22 Oct 2025 20:42:43 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 To: internals@lists.php.net References: <0e4e39d6-9cc9-4970-92e0-2463143b4011@app.fastmail.com> <37180d8d-85b4-49a3-a672-334bf4329470@app.fastmail.com> <2f8524a7-dea2-4fbf-933a-c538d3706253@app.fastmail.com> <151800a7-1094-49bc-8e43-c593a74741af@app.fastmail.com> Content-Language: en-US Autocrypt: addr=alec@alec.pl; keydata= xsBNBEy9TtkBCAC4ef0IJaqTDQNQZ5CPrHvNs5kcACvtffwydrTcRJ28dHwjZD8daSxfVYEo acyARevTOvsp36Vgq8Yt7ATu6y7MPBaPj9Lq0kwX7HM8QDn8jTfufAgMjxcw5bD+JNR5+8G9 hUF3F35gVuAd471hS+QB/Ug/PezcNx9H5yFUMuvrO3ybyIDhw5qJI2RoJMjMr5DPKUG7z810 1e/NW7y9FfHq+Ony7A70w+vcfv1L+LLX5gfrpKI3m0zKm7cj1vyxZfC9RijIzWZN3GgExexI KJdbkcg9F/zigKo72TJhgvjy6YZP03HmWZVcpsd3aIT3Tweg0cCivaKVBNcFR1oda6XvABEB AAHNFkEuTC5FLkMgPGFsZWNAYWxlYy5wbD7CwHsEEwECACUCGyMGCwkIBwMCBhUIAgkKCwQW AgMBAh4BAheABQJMvVAwAhkBAAoJEL7mdKAZNZ3BEhkH/1eAuCOSXsWg8YwZzmABoKKZfNpJ Z3QTwAMxXyCPjJMwLMLHsrVO+VbGupFcIW/q/3bvt1r8LwPB73rg0TFiHoYzeQzdnOVYFW7w OYz9BDVjLE4goDk6xN5Nj1CpBMXzQFdr3HVKyuRK1CLd9p13CofiBlLsQ4JqtosnlvSCEjTL yIajACU3kY2je1e58N5VHzZ+VMeg2xbuQJ3q1iTkYggZ+xRC1muw4Xgt2vxgfWjn7u3dmjYM T3H2WFprLZwliejHgzhWdYABdyCU5VuGCLOV+xk2UCADya0hvVVIezA/4YG3w01yjsljRrKy HFJUqw+MqagA6dsfflZSvmROKMbOwE0ETL1O2QEIANHbid+rMQ/IX0/UyVtnLWunDEg6Yl2B twHTecZ4Ym3tBxc1sbPDoYpY0DZ86gYi9DCbolrdjnrRK9ldYItVJ8rJUkEIDz/2yhjcr3s3 p2SyI94bocoG0WW+VRlssJMxTB2ihblihkY5HqT+9PgOFxnpSqz1ksTaI3JOVcokidhoB7MJ muyb28rNtZCJP7upRUwBSoZfHiL83w3Ad1Fn49QVO7kshH11lNyJ9jB17BTl1I0sj7RPqAor JcMxsSOJXW71ZcipXWym+GacY/qziQw7bT9CQYSmr4SiRV7GahD91enDkdv+pUAnb8NEifQ1 LT26XcL6Ng9EbG5AT4qI46kAEQEAAcLAXwQYAQIACQUCTL1O2QIbDAAKCRC+5nSgGTWdwe2T CACaux3lHitD8IIO5fy6RxPqym6vMlKiN0IyilahtJ0A2htNqwbFb6TukpzKw04DGSPEOGPa o4hdsLtQtqAPwqrR+FGJDc6V/jD0rPjThC3NcvkJuoi622ZLCsi8TAL5kBmF2NYd7ejszB31 5EzvpXSeES8+9pv6yshzUborEg9QKhPxW0yvrdj2OwFUlRr6/jLpKmMLzSx5F0yEg10urvfe 9Sttk5TVzHycOa1nKSzj79F1jXTl/mji/i082s1nlwb8d6LNVrm0e1tGMxSk/WpghFVVSm4O MvUvMkEEDkwGsm+mPcmX4UPcvq/wU3hGhDeVlpkfVTJQGvDbEUzTXbz6 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: alec@alec.pl (Aleksander Machniak) On 22.10.2025 19:24, John Bafford wrote: > * Aleksander Machniak brought up possibly merging suspend and delay. As you note, they are semantically different (delay for a specified time interval, vs. cooperatively yield execution for an unspecified time), and I think they should stay separate. If we're bikeshedding, I might rename suspend() to yield(), though that might not be possible with yield being a language keyword. That could be worked around if yield() was, say, a static method on Coroutine, so you would call Coroutine::yield() to yield the current coroutine. (That could also apply to isCancelled, so a particular coroutine would never need to have a reference to itself to check if cancellation is requested.) Yeah, my first reaction was "suspend() does not sound right, it should be yield", but we indeed have yield already, so that might be confusing. Why I wanted to get rid of delay()? Because "The delay function suspends the execution of a coroutine". So, to me it implies suspend. Am I right that it is essentially suspend() + usleep()? -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com