Re: PHP True Async RFC - Stage 2
From: Edmond Dantes Date: Sun, 16 Mar 2025 15:36:20 +0000 Subject: Re: PHP True Async RFC - Stage 2 References: 1 2 Groups: php.internals Request: Send a blank email to [email protected] to get a copy of this message
Hello. > > Just one quick question for now; why issuspend()
a function and not a statement? > Yes, suspend() is a function from the Async namespace. I couldn't find any strong reasons to define it as an operator: ```php suspend(); // vs suspend; ``` For example, the spawn operator makes the code more expressive and eliminates the need for closing parentheses. await here looks more like a prefix for spawn. --- Ed.
Thread (59 messages)
« previous | php.internals (#126785) | next » |
---|