Process.threads

ThreadInfo[] threads() @trusted

Gets information about threads in this process.

Returns

Array of ThreadInfo structs.

Throws

NoSuchProcess if the process doesn't exist.

AccessDenied if access is denied.

Example:

auto proc = Process.current();
auto threads = proc.threads();
writeln("Number of threads: ", threads.length);