Re: [VOTE] True Async RFC 1.6

From: Date: Sat, 22 Nov 2025 15:09:56 +0000
Subject: Re: [VOTE] True Async RFC 1.6
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-129397@lists.php.net to get a copy of this message
> From my understanding, the code does not continue if there is no io event?
Yes

> Will it use default_socket_timeout from php.ini and/or use the timeout specified in the stream
> context?
There are many more different cases in the real C code.
For sockets, I remember it uses a timeout.
For filesystem files, I think there is no such thing.

> Can I mix sync IO and async IO in one function?
In essence, there is no more sync I/O.
Any input/output is potentially considered asynchronous.
Launching multiple coroutines lets the programmer create several I/O
operations that run asynchronously.
Thus, the degree of asynchrony is equal to the number of coroutines.

The code inside a coroutine creates the illusion of step-by-step
sequential execution with no extra effort.
Therefore, in this model the programmer writes less code and uses
Promises less often.

>  if the server uses a mixed storage of SSDs and HDDs and I only want async io for the SSDs?
How will PHP understand which type of storage it is dealing with?


Thread (106 messages)

« previous php.internals (#129397) next »