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
gdbor 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:
- write a custom eventlog hook to try to get this info https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime_control.html#hooks-to-change-rts-behaviour
- create a hacky RTS binding somehow