Also, on FreeBSD, SetThreadName() will silently fail if the name is more than 19 bytes long (not including terminating null) truncate as needed.