First stab at using pthreads for multithreaded map/reduce/filter