[php-src] Issue #20980: Test parallellization uses a stupid strategy

[email protected] (ndossche)
Newsgroups php.bugs
Message-ID <cvUbAXb9wQSeklHgQP5wwbyFQHSoohW3ZDA4FEUA30s@main.internal.php.net>
Issue: https://github.com/php/php-src/issues/20980
Author: ndossche

### Description

When running ./run-test.php with the -j argument, all the tests are scheduled to the workers before even running them. This means that if you have a worker which finishes all its tests quickly it'll sit idle even if there are many more other tests to run. One can observe this often because at the end of a test run the number of concurrent working test runners drops quickly.

### PHP Version

```plain
8.4+
```

### Operating System

N/A
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.