The RTS sets thread names on Linux, but not other POSIX platforms.
FreeBSD has the requesite functionality, and the patch below can
enable it. Not sure whether this is in fact useful, since all
threads would get the same name ("ghc_worker"):
On Linux the thread name is taken from the static variable
"program_invocation_short_name", which is again the same
for all threads of each program, but is not globally the
same. FreeBSD could get the same result with getprogname(3).
The question still remains as to whether setting such thread
names is useful or pointless...
Am 29.08.2018 um 01:36 schrieb Viktor Dukhovni:
> The question still remains as to whether setting such thread
> names is useful or pointless...
Non-Haskell code in the program might create threads, too.
The name would help distinguishing them from Haskell's own threads.
It's admittedly not a common scenario, but there it is :-)
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.