Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128881 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 7BF581A00BC for ; Tue, 21 Oct 2025 14:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761058607; bh=pSpgTg3jXIMPbRLppGXe2a/yOcFJNwY4xNPGo4EiJN0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=H0759jpxgpVPekkgynafOWvRNUi/Qg6oBpdNkqjJfkORKT/GliCCayAw1kq+iJIuY 1yeQvyQKv3y7xb9wKRhdSFAaHyHaR/FHRHQTWE226T4qGuelA+5s+obfUNlBB07iX4 hFkAYUcBQMQEHJ2EH4CyzBOVTI3yJ29usctnPg2slkOXZrGfH8vOKruvyhE7LGJ7MP +FHOsJ27UVHNyFb2ZjH9w18vOfkBB+AIwgwq1DDFsYZCvjoD/vAOjSn9sMLy3XT5do WM8ntSolIyd8+13qem6KY4omgQFqOZmkKga4Dzo7F0q7B1HgUEWMfDi2cs0h//gk60 ZnFBRvqyn92Ow== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 086AF18006D for ; Tue, 21 Oct 2025 14:56:43 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) (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 ; Tue, 21 Oct 2025 14:56:42 +0000 (UTC) Received: by mail-vs1-f46.google.com with SMTP id ada2fe7eead31-5d967b67003so3691453137.2 for ; Tue, 21 Oct 2025 07:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761058597; x=1761663397; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WPxO8oci7Qe+nO6nq50jprhAAHP2zpvzJCk+xvnKKNE=; b=edYFiyqpx4XrmQdzkxAaEiM5aKx8xmcC5aeAmDJbQqvStGXWZsfFZ6p66FJRtJ55DW oyJTIOwCORchDiG0Ej49f2HAtuOo7NRHSPJcBqSHfnT2i+5V01GIi6scsxSy36ra8D+Q +YOA7KGN8G48HLG+kbiG9m6s7zcOfA7dMCyM8eObOGYXWwM60MHDfmHf181kTQ05ZQAE OpW7fpz2j0MjZzT2vQwmnsYd0QSV0xxb8v0YYy4TD62PeS/aT8sMzYtYqW/8ss3PVsLA NG0YAofEp1Tfd0QLFKctmgR3VoyTTGwgkcCiH2kuOZp8efrSD0lvdHdoMIXcweNsITSA +zjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761058597; x=1761663397; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WPxO8oci7Qe+nO6nq50jprhAAHP2zpvzJCk+xvnKKNE=; b=aJJfNeK+cqSt0NDJGZYgQluBLKue/ha4pPCUTCZPwGbzazjKI/ugvZ+VbozyvPDdMj tM0nWwi/K0IPqv+2jVt+Rz8+/Uu5SiDeIShqiYpD+fT2zxU8jNu2kOyi0UKMbO1z4T5v CiTe1TwHyT9peiQPzL/oERKFElx85VyPo8RUqIPWd+hb6z8MTyBEO6onFtaAg/v8Ilxo FhoX53hYWf4mrXg5YsV8o3rMLjGAMOYqmXyrJFpd9BsVQvjBaFLoNeuHNGHNtO5aGla4 ISYlnHCMVja8FvHQ+jtL/SI4l5t2egsV3fP9u/NeXs7S6sclFV8s+ciL/tCyvqoyqh9F NjYw== X-Gm-Message-State: AOJu0YzyNeLKCvb2ICwXKhfcEyh84ZsstYG2knPX9wyVAmWT3HQ9Bz4r CTPGjH+M7RYzWMZE7NdDs9dV3VS2zrYE+Cd0YOLlq1MhxbS+xMWf8toBddU4J11WDdiafeYVx8m 0t9ddUsI2f+EFAOUX7FdNo2mKbMPt1gM= X-Gm-Gg: ASbGncsWjETsti0JGFGuJN6Q2ICyZZU7ArHqrbyGKldIXYH540F41UXtxycSVQ9qknN CeYnwCJE9XOUjGNdwWUAa3t3NIRzcboqQztEZKs3s+TaxSxQl6Dzc6Y0GudyTh1wVsLjH1NWXZg 2XH1vI6EJ0pqqyoEkeNH+cXNSp0tLHpinCpmKuqbNtiKADwc+Bvz+uQDBX9/CBh5Tp1m3qRCgjq AU5zLS4mU6/B+WC+fZ2R7nDSggpKNwTeGJRTzYrTXr172isY90TGeaqc04hyyx8KGqawBDgB0KP sXUvdnvvz8MRyU5zckfgSbOnEg== X-Google-Smtp-Source: AGHT+IEz4brY8QSVG5uO25OHkeKadLG5TYj/1cZFzX0qmJnXShOfm5GM76Ishqnp4WgxmaocHBSXy6alkisH8Je/Pkg= X-Received: by 2002:a05:6102:162c:b0:5d5:f6ae:38e9 with SMTP id ada2fe7eead31-5d7dd6f5af7mr5577112137.42.1761058596729; Tue, 21 Oct 2025 07:56:36 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <0e4e39d6-9cc9-4970-92e0-2463143b4011@app.fastmail.com> In-Reply-To: <0e4e39d6-9cc9-4970-92e0-2463143b4011@app.fastmail.com> Date: Tue, 21 Oct 2025 17:56:25 +0300 X-Gm-Features: AS18NWDQDSC2JsDgPy7O2HYuvMrS9pMjG5GU2GrOl7OvEcVButkvhIQ4gQPIITY Message-ID: Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 To: Rob Landers Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: edmond.ht@gmail.com (Edmond Dantes) > This seems a bit contradictory and confuses things. When I await(), do I = need to do it in a loop, or just once? > It might be a good idea to make a couple subtypes: Signal and Future. Cor= outines become Future that only await once, while Signal is something that = can be awaited many times. I made a mistake in my previous response, and it requires clarification. Classes that can be awaited multiple times are indeed possible. These include `TimeInterval`, `Channel`, `FileSystemEvent`, as well as I/O triggers. All of these classes can be `Awaitable`. This is done to allow bulk waiting on objects, regardless of how they work internally. So this is meant for functions like `awaitXX`, although such behavior is also possible for the `await()` function itself: ```php $timeInterval =3D new Async\TimeInterval(1000); while(true) { await($timeInterval); } ``` As for objects of type `Future`, it=E2=80=99s clear that in future RFCs the= re will be a `FutureInterface`, which will be implemented by coroutines.