Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个VisualStudio Add-in(插件),当这个Add-in的功能被触发时,需要几秒钟才能完成。在此期间,UI 被阻止。如何避免阻塞 UI?
在诸如BackgroundWorker之类的线程中执行实际工作。这将使 UI 线程保持响应,因为它不处理昂贵的操作。