0

Python has a method called threading.enumerate() that returns all threads belonging to a process. How can this be done in Swift (on macOS/Linux)? I want to get an Array of Strings that belongs to the process, regardless of wether I created it or a library created it.

The kinds of threads that I want are those that will be shown when I execute ps -T.

Papershine
  • 4,995
  • 2
  • 24
  • 48

0 Answers0