Mark Glines changes to add ithreads support: