Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129308 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 866D21A00C1 for ; Wed, 19 Nov 2025 15:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763566871; bh=OJ/PXk9gfSAX7+JX22zbU9mAw3YNKRGOWco9mjPz5hU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XW9P9U5p+uvdZi8hFaa6okD9J6ReosPQ+PZ+yz92q35cdPDoF89CK3Y5ry3+Re6cs +/PTZtl9nEIksl0HZfQgjvFyCZtHn7+T3mfhe8wyCvSGyTXz7p6mbsoRjJPPuJOApm CwRaQxigZhmqCGkizJEEXMid8QgdfK6nsB2yNaKZ0SjjrW19jdIeVEdcRq+ApXvY0k GpDQwop1He4ZxjfLLHSe8fWb19EeX0ldzZa6PKunw20Dp5QjyhfL15SSfUzOlAws7A N7BjLrq2QQYbibhThjWGxAZSgCu6fip7TwwMZuCFYX39OE7HZ0Wt0MFct1xAlrfDPj YYCNuvIVA/FLA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B7D7F18054D for ; Wed, 19 Nov 2025 15:41:07 +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_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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, 19 Nov 2025 15:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1763566857; bh=yuix3I57f2YvuSj6UUILEIwRpeDyf1PDEAkToHsL2Cg=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=Ydcus0loiN4+BMkX0ZUOviT3QFdklVLkHq4pNzQp9h6B8apSEJdcPNkTbzLTh8jrA C6eDB5tcx9H+f48cb3lo9EF6rwltmW9D9zoXWmZ/v4+fNm+JG98NV0phF+bfL0OI6+ 3+3+yyQJ8arW/4Lh8dfcbDczYyfTIpN6Qdv3Eru9MtmRdI94ieqRtldVSQOscnC/lv oaQn5AC/yeydFy1DL2hwF2NxkXjDar58uGnDd/9Vrq6fmulRFEwHviz9+FHTGo51pF vINEBCPhAiVPdoFSe73minrpWX9NJpb7if2wfx8yGOFfLJGmgC/rvXb+k2Uev02i7x cR9WI9do2HwBg== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Wed, 19 Nov 2025 16:40:57 +0100 To: Edmond Dantes Cc: php internals Subject: Re: [PHP-DEV] [VOTE] True Async RFC 1.6 In-Reply-To: References: <21911eecbb08cd0845784e54b942e0da@bastelstu.be> Message-ID: <6b52b6c8a4c869d1f801f0a896a0f63a@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-11-19 16:19, schrieb Edmond Dantes: >> I'm afraid to note that the proposed API is in violation of our policy >> regarding Throwables > Thank you. It was fixed. That is not quite right. The base exception should be `\Async\AsyncException`. I am also noticing that you changed the `DeadlockError` to `DeadlockException` which is a significant change from the previous proposal. The Error hierarchy is meant for problems that are not expected to be caught, because they cannot usefully be handled. The Exception hierarchy is something that should be caught. Given that the RFC says (highlighting mine): > This condition is called a Deadlock, and it represents a **serious > logical error**. I believe it should be a `DeadlockError` like it originally proposed. That one should then extend `\Async\AsyncError` and similarly `\Async\AsyncError` should extend `\Error. Similarly for `CancellationError`. It should extend `\Async\AsyncError`. I'm seeing the comment “Does not extend Exception to avoid accidental suppression” which makes sense to me, but the Error hierarchy specifically isn't an Exception. And folks catching `\Throwable` will catch `CancellationError` as well, so I don't see a reason why it should be treated differently in this regard. ------------ Looking at the stub more carefully, I'm also seeing that `\Async\gracefulShutdown()` should be `\Async\graceful_shutdown()` instead (and similarly for `currentCoroutine()` -> `current_coroutine()` and `getCoroutines()` -> `get_coroutines()`). This is something that I could have caught earlier and I'm sorry that I did not. However since changes to the RFC will still be required (which means that the vote will need to be cancelled), it probably makes sense to fix that as well. Best regards Tim Düsterhus