Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113431 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50940 invoked from network); 10 Mar 2021 11:04:52 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Mar 2021 11:04:52 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4DDDA1804B8 for ; Wed, 10 Mar 2021 02:57:03 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 10 Mar 2021 02:57:03 -0800 (PST) Received: by mail-lf1-f44.google.com with SMTP id x4so25996226lfu.7 for ; Wed, 10 Mar 2021 02:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DpKwzkQvPDmQRD7QuOs0KGC7D/Sa69l+YHeZ14fGSLw=; b=TMQAvqFiebFao9NQ3JIwvYE7a4HysM9Xw/bteUnZfGqmBtsw5m0eVRhchDXNsbPju9 obTNuQU37QWSXCnKgYtc7rqwCjLRwhO71L76IaM+CjuvkdbFqRQF/0/oXJ8wm1FSoqng iWk6S5n3FT+vxbGNw47JX0tCk4adoTgsNQbEF0i6IxVfYz0dAx/pYqjRnrQnxjJ+Q39L 49PsukU3gUmJG8z4CNdR4wYKlXTtMgH1CraUK1U8bbNFPA+CdJmB0tWfyuymGp5MJtgE KEa2Iqciskk7hvbQZPlRenZ9CAqoZBYTzGv6JU+/Dx0TUA3/fvpNsw5KmqsUqkgai8dg optg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DpKwzkQvPDmQRD7QuOs0KGC7D/Sa69l+YHeZ14fGSLw=; b=qnjyibUFEmJziPGQvfdq3CxS6fWxgnsfnoRsrxdOfWhmwiYJ+m1CzsGIgoY9zEZZo9 +aw4hygzDr07DvHplLWgZ9kRDyzpUtIHqrMMAgRbAHxAcQWXoXvHDIjNFLQWVUVZsKvq oGUufDUUmmy4MBpNfu4LUi94eIlo+E/rYpwTFl4ln6vyIIQkyzNNpvCugwe5gsUrw3p9 x9OPFHO8nFP4x66J2aor5pzf3mb1VCxKjEjMsHm/bMRqQa2qa0FP34KFsDVVLMIa/EMM YiWNXozLDDDlPcyZW8XgCbLoa1TnCVL8WZPl98ANIYAKnclAv2K/c8UgWZFZZ/PB+JWd DGLA== X-Gm-Message-State: AOAM5312ZBQoQQ07Lt/3XbBcy2luEvaSxXaQMVM3BsJmPzzpl8ovNIU5 X+AQzIIxAGPEPZNuJoJWzpEmKgHHFQ/Dz6xtxpk= X-Google-Smtp-Source: ABdhPJxIxWND6PQnBKDop6nt17vDo9cweUQgajUEubQMlb97qQFKdLO6BHM5+aVF21jizB2w+Xz+NPoPW6lc0oTCnwA= X-Received: by 2002:a19:b47:: with SMTP id 68mr1591278lfl.343.1615373820834; Wed, 10 Mar 2021 02:57:00 -0800 (PST) MIME-Version: 1.0 References: <8812EE70-4720-4639-926E-1EA206624BC1@trowski.com> In-Reply-To: Date: Wed, 10 Mar 2021 02:56:49 -0800 Message-ID: To: twosee Cc: Aaron Piotrowski , php internals Content-Type: multipart/alternative; boundary="000000000000c535e805bd2c8646" Subject: Re: [PHP-DEV] [VOTE] Fibers From: sarkedev@gmail.com (Peter Stalman) --000000000000c535e805bd2c8646 Content-Type: text/plain; charset="UTF-8" On Tue, Mar 9, 2021 at 6:03 PM twosee wrote: > > 5. Not compatible with Swoole > > In my opinion, Swoole is an important part of the PHP ecosystem. But now, > Fiber cannot work with Swoole. And based on the above reasons, Swoole will > not consider compatible fiber. > > We would expect some ZendAPI rather than Fiber extensions to provide > support for coroutine switching. > > Hi Twosee, Are you saying that by adding this Fiber code to core it will prevent Swoole from functioning? If so, that is concerning. Or are you simply saying that Swoole doesn't like this implementation and will not use it with their own code? One thing to consider when comparing the Fiber implementation is that the vast majority of PHP applications are still run behind a web server in short-lived requests. Unlike Swoole, Swow, and Parallel, it isn't limited to ZTS or CLI. It might not be the ideal solution, but IMO it is a step in the right direction for PHP to allow for better async support. And I think you are right that "Fiber is just an enhancement of Generator'', but so what? The Generator addition in 5.5 opened up PHP to a hacky way of doing async, but it worked everywhere. Fiber allows that to be much more convenient in switching contexts deep inside a call stack. I don't think it needs to be the end-all-be-all coroutine solution to rival Goroutines, and I'm pretty sure it's not trying to be. Thanks, Peter --000000000000c535e805bd2c8646--