improves pthread implementation of cache-oblivious GEP
TODO: There is no limitation of threads at the moment. Need to implement
      a thread scheduler by hand for this purpose.