Rewrite thread pool join and fix compiler warnings