Harden MiscellaneousFilesWorkspace against events from other threads
We had a bunch of crashes against Update 3 where MiscellaneousFilesWorkspace would go sideways when we were responding to workspace changed events for buffers on a different thread. Commit dfcfbaa6 mitigated the direct crashes somewhat, but still meant we had some racy code which we probably didn't want. This hardens the code so if we do get a notification on a background thread (which is unfortunately controlled by the sending workspace), we'll just send it back to the UI thread and safely handle it from there. In the dumps in question, even the Roslyn workspace was attached to the background thread, which is known issue if somebody created it via MEF when they shouldn't have. That's being fixed as a part of https://github.com/dotnet/roslyn/pull/14354 so we won't concern ourselves with it here.
Showing
想要评论请 注册 或 登录