remove the dirty codes in thread pool