2
我正在开发C#中的前景插件,我的继承人启动:展望外接展开线
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
//adds the new issueTopMenu
//Search the menu and delete if found
RemoveMenubar();
//adds the panel
AddPanelToExplorer();
//Method to create new menu
AddMenuBar();
}
我如何能做到这一点对一个线程上运行,因为它访问web服务来获取一些数据,和当展望开始冻结,直到它获得数据,并且我想宣布冻结时间。
尽管Outlook *将* marshall访问主线程的OOM,我发现最好的方式是确保OOM *仅在主线程中使用*。这似乎有助于缓解“随机”问题。正如所指出的,不触及OOM(或Winforms等;-)的工作可以在后台线程中正常运行。 – 2011-05-12 23:07:08