The gettid test relies on parallel streams to count the threads.
However, the number of threads actually used is arbitrary, and can legitimately be 1 in some cases (highlighted by the Windows build).
Refactor the test to use a known number of threads and then robustly check.
(Also apply the same change to getpid test - although there the variable number of actual threads used is less of an issue as the pid count should be 1 anyway)
The gettid test relies on parallel streams to count the threads. However, the number of threads actually used is arbitrary, and can legitimately be 1 in some cases (highlighted by the Windows build). Refactor the test to use a known number of threads and then robustly check. (Also apply the same change to getpid test - although there the variable number of actual threads used is less of an issue as the pid count should be 1 anyway)