Add some internal documentation for some thread related functions