Getting a list or count of all running threads

Viewed 160

How can I do one of the following?

  • get a list of ThreadIDs all running forked threads (preferably with labels) from application code?
  • get a simple (maybe approximate; e.g. from the last major GC), count of running threads
  • get either of the above from gdb or similar

Things that don't work for me:

  • requiring a profiling build
  • maintaining some data structure to try to track this information myself

Things I thought might be promising:

0 Answers
Related