Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126424 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 qa.php.net (Postfix) with ESMTPS id 4474B1A00BC for ; Sun, 16 Feb 2025 15:41:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739720333; bh=6GNPxGF9QxToUxG/QgGVZH9y9WzaKFuy4HnrfuPeK0Y=; h=Date:Subject:To:References:From:In-Reply-To:From; b=a9uKDudG6VFu2NtJ0dOoLzFvB3npMhGfu63T0MLiasiRP8WA3BrGQcZk0kzhRsh1U xD2UGXCjW3h54QG9ARe7QdMHapZd9N3uHIRKPXR+8etYvmdkcpX2umMTQy9uNNPD5S nFXfGpdL2XTrWswEfWpzAiPd8C9nEEokDBYwejUv9dxTeQx80n5pFofXG3mWKpsDfu icN1C0V07AQipcryBir4OJMonsGj613kS0l7nJGR96SSlILMGQOOvRxyfKST25dDoV AVujJXTkH3mAB1nr5U64Q/tkTbNt6vvE9ZKczIeTMlkHOtl6KjTKuL2rCWTOkQeiNp Mrrak/vGKBELw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 33A6118006C for ; Sun, 16 Feb 2025 15:38:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 ; Sun, 16 Feb 2025 15:38:51 +0000 (UTC) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4395f81db4dso20927485e9.1 for ; Sun, 16 Feb 2025 07:41:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1739720492; x=1740325292; darn=lists.php.net; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=zWSa2aVn7NW7jS1UAuYnNnjp6EBzK/3kXNQx2tDFkyQ=; b=dtpBDzWVmLcO4DJWOf00ASI3xEFtqyyilqAt4u5u0U/aXEh0ajvyZ5vJd4SSCnxhDM 6lm0C50ngZRtms8qQX85TNj1FjW0sSMChLgi4m55y50NswkktKRxSie5R6RBRyHu6nD1 YOqCX/nydU+vF+hMQta0DVPRmmpt4SzYCeSr8CGpxtuOjRQDsNL2qS/UEaFXs3MyEFzb A4S5uo88HiD6wKH4CZUkDumNFPaVhKSbiDayTySLutC9MG2OccVLNeDoVqjP7mKXcr4Q X6168zM9v/PizbB3nIHifqGk+3Lg8v/VHxb0Y+1ixYZMt5+igQekCXlksKNG82hM+BZ+ nb1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739720492; x=1740325292; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=zWSa2aVn7NW7jS1UAuYnNnjp6EBzK/3kXNQx2tDFkyQ=; b=bJEgtJb4AyeinE5dx/DLEXftrcj5NOawjbe/uAxX97DdtB/aGeBvQdIeC4XNO7Kfjp zB7oGtyiYNweV17mYysJjj2hpSLKIRj+vlJOKCzQLV3dGEqu2pOoOBL1Lzi9jLJD6uQm sBccpN5HbWYa0EQOefIEkrFTkdaDI1j0rWaE6D+MZ3Cr1xZFQMATGyfpbSoccY5OoOl4 60l7cM6O9DFLlyOHTGC8P4ngBkQr9f2eqCZCnRkhCAWJFhZE3/lSJ9Pyy8Cp/XEOyQWL m7Xfe8yxga7NNwTrKvVPo+V6t+cSeYSWJs9U3N5y40UYljWXfzl6qh6sSx9G9fznsIJS 7pxA== X-Gm-Message-State: AOJu0YzC7+JcGMLm4CjX4EIJqrFdinXU03g08ZzffraoeyWpUDXvWaiC YXqk7dD2+2+M2ObHV2aqcqabT+UvtJGt49nNqz6Tr/MehQkjTOP6JVMMRITlNWGKQQLhqoyXvz5 Q X-Gm-Gg: ASbGncu76fqPxhAJthWJ5XflwfkNdX9ixzaSAZlL/TlaNMkU4Oeg9kns2XtN2Nx8kPV CKVKa+EWt4DSPH3Lay3X3zKFOJ+sjQfAz2k22WmV2IuV9dpQWjIgO8flPHkx7G8143aqnbA5abb wA24z30nvJnrS299zZ2GYYx7bttr1dKKh4uSm3XjbBro/nnv+xu3LLET0L+ZRyfs/DgTSEhCzM3 lBGw6on+px/Cp2JtHR9WPbng7p6YSNSGB51XmfqxklyhDD5Tw3g1WcJDbPSPkPp+a23QE+t8GOY W8qXoms5inB0Mrgo5F90RBKotO2vssUT+mvbWbKz6V+s3AVV27g5VYm3jQwGj2cXSCqPdS60Htg = X-Google-Smtp-Source: AGHT+IGK15pvdrhzbEnG8a5+jbeyeTomXNP+QbmvNq7WMPbc/gSgOTMKLRmJdvQWMnVFCMkCnLxgMg== X-Received: by 2002:a05:600c:1c25:b0:439:8345:17a6 with SMTP id 5b1f17b1804b1-439834518abmr7352925e9.12.1739720492255; Sun, 16 Feb 2025 07:41:32 -0800 (PST) Received: from ?IPV6:2a01:4b00:bf09:5101:a171:18c1:ff55:7815? ([2a01:4b00:bf09:5101:a171:18c1:ff55:7815]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-439618102f1sm96071765e9.19.2025.02.16.07.41.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Feb 2025 07:41:30 -0800 (PST) Content-Type: multipart/alternative; boundary="------------0wHzBCvtdOm0eLLxjo1YO18X" Message-ID: <24becc76-b67f-4805-b33b-cd4f9f6d0b30@scriptfusion.com> Date: Sun, 16 Feb 2025 15:41:29 +0000 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] PHP True Async To: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: From: bilge@scriptfusion.com (Bilge) This is a multi-part message in MIME format. --------------0wHzBCvtdOm0eLLxjo1YO18X Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 14/02/2025 11:22, Edmond Dantes wrote: > > Good day, everyone. > > I would like to request permission to create an RFC dedicated to the > asynchronous module for PHP. > > Although the source code development is still in progress, a > significant part of it has already been written, and the initial tests > are working successfully. Therefore, I could start the documentation > process if you consider this topic relevant and interesting for the > community. > > > A brief overview of what this RFC will cover: > > 1. *True* asynchronous support for PHP core functions without > additional "tricks." > 2. *Scheduler* and *Reactor* components, providing a C-API for PHP > extensions to enable non-blocking I/O in plugins or core code. > 3. *User-Land API* that mirrors the C-API for PHP developers. > 4. Basic primitives for concurrent programming, such as *Channel* and > *Iterator*. > 5. *Built-in* integration with the *LibUV* library. > > The library is based on *Fiber*, extending and enhancing it to provide > PHP developers with a full set of tools for concurrent applications. > > Have a great day! > > Edmond > Is it really necessary to have all these `Async\launchScheduler();` calls? Why can't the scheduler always be running, the same as it is in JavaScript or any other async language? Even (userland) Revolt does not require the event loop to be manually started. Cheers, Bilge --------------0wHzBCvtdOm0eLLxjo1YO18X Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 14/02/2025 11:22, Edmond Dantes wrote:

Good day, everyone.

I would like to request permission to create an RFC dedicated to the asynchronous module for PHP.

Although the source code development is still in progress, a significant part of it has already been written, and the initial tests are working successfully. Therefore, I could start the documentation process if you consider this topic relevant and interesting for the community.

A brief overview of what this RFC will cover:

  1. True asynchronous support for PHP core functions without additional "tricks."
  2. Scheduler and Reactor components, providing a C-API for PHP extensions to enable non-blocking I/O in plugins or core code.
  3. User-Land API that mirrors the C-API for PHP developers.
  4. Basic primitives for concurrent programming, such as Channel and Iterator.
  5. Built-in integration with the LibUV library.

The library is based on Fiber, extending and enhancing it to provide PHP developers with a full set of tools for concurrent applications.

Have a great day!

Edmond

Is it really necessary to have all these `Async\launchScheduler();` calls? Why can't the scheduler always be running, the same as it is in JavaScript or any other async language? Even (userland) Revolt does not require the event loop to be manually started.

Cheers,
Bilge

--------------0wHzBCvtdOm0eLLxjo1YO18X--