added documentation to threading.hpp