Reuse end iterator in Pthreads as is done in Fastflow.