add multithread support for hashtable.