Re: PHP True Async

From: Date: Fri, 14 Feb 2025 13:28:07 +0000
Subject: Re: PHP True Async
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-126409@lists.php.net to get a copy of this message
> > >> 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. >> > > Looks interesting. I understand that's not ready for review yet but > quickly checked the code anyway. Is there some particular reason why this > is not an extension? Think it might actually make sense to split it to two > extensions - one for the core main stuff (that could be enabled by default) > and then libuv optional part - similar to pdo for example. I haven't > checked too deeply the code though so I might be missing things. Feel free > to create a draft PR even if it's not ready. It might help to get some > initial pre-reviews... :) > > In terms of RFC, it would be good to also compare it with alternatives. From a quick look it slightly reminded me swow ( https://github.com/swow/swow ) but I didn't really look that deeply into it and I also don't know that much about swow so might be wrong.

« previous php.internals (#126409) next »