pthread implementation of dumpall and dumpclass.