For Linux systems, this is how I do it in the [psutil
library](https://github.com/johnscillieri/psutil-nim):
proc cpu_count_logical*(): int =
## Return the number of logical CPUs in the system.
try:
return sysconf( SC_NPROCESSORS_ONLN )
except
Yes, that is what I meant, the `threads` that are available per system (all cpu
cores), which you can see using commands such as `lscpu` or `htop`.
TS probably means "processor threads" \- Hyper Threading
The docs are correct, there is no such thing as the "number of available
threads", threads are dynamic in nature, on some OSes you can create thousands
of them.
Yes, that returns the number of available threads, though its doc says
processors/cores.
You mean the number of available cores?
[https://nim-lang.org/docs/osproc.html#countProcessors](https://nim-lang.org/docs/osproc.html#countProcessors),
How do you get the number of available system threads inside a Nim proggram?