完成后,如何从开始使用ThreadPool.QueueUserWorkItem方法的主题获得一些反馈?
I would recommend using a BackgroundWorker
instead. That also uses the threadpool, and launches a seperate event (on the calling thread) when the background task is complete.
Otherwise you will have to do this manually by invoking a method manually on the main thread, but the BackgroundWorker
encapsulates this in a very nice manner.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.