Process.numThreads

int numThreads() @safe

Gets the number of threads in this process.

Returns

Number of threads.

Throws

NoSuchProcess if the process doesn't exist.

Example:

auto proc = Process.current();
writeln("Threads: ", proc.numThreads());