add Pthreads in tessellate.hpp