repair the threadpool memory leak, by summer099, thanks