Re: [RFC] Add num_available_processors
From: Daniel Kesselberg Date: Sun, 15 Jun 2025 17:30:16 +0000 Subject: Re: [RFC] Add num_available_processors References: 1 2 3 4 5 6 7 Groups: php.internals Request: Send a blank email to internals+get-127665@lists.php.net to get a copy of this message
Hi, Thanks for all your feedback on the RFC. I've updated the RFC to incorporate most of your feedback: https://wiki.php.net/rfc/num_available_processors 1) The limitation, that the CPU affinity mask is ignored 2) The naming discussion 3) Function availability on unsupported platforms 4) Return type How do we continue? ;) I see there are various ideas how to approach it, is that something you would vote (let's do a or b) on, or how does that work? Best Daniel On 2025-05-27 19:13, Ben Ramsey wrote:On 5/27/25 12:01, Derick Rethans wrote:On 27 May 2025 17:37:47 BST, Ben Ramsey <ramsey@php.net> wrote:I see. Carry on, then. :-) Cheers, BenAre you suggesting that the function itself not be available or that it throws when you attempt to call it on a system that doesn't support it? I don't like the idea of the function not being available if the system doesn't support the functionality. Users would have to call function_exists() before using the function, in those cases.This has been the accepted practise for years, if not decades. If functionality isn't available, the function shouldn't exist. We do the same for posix (such as posix_getrlimit) and DNS related functions. This also allows for polyfills. cheers Derick
Thread (21 messages)
| « previous | php.internals (#127665) | next » |
|---|