Skip to content
代码片段 群组 项目
提交 8097ff9d 编辑于 作者: Jason Malinowski's avatar Jason Malinowski
浏览文件

Workaround a deadlock caused by watching .editorconfigs

We use the CodingConventions library from Visual Studio that parses
and processes .editorconfig files for us. This library under the covers
uses the Visual Studio file watching service for watching files.
In Visual Studio 2017 the file watching service made the guarantee that
watching files could be done in a free-threaded manner in the background
and wouldn't marshal. The .editorconfig library then passed this
guarantee along to us.

In Dev16, the file watching service was rewritten, and accidentally
lost that guarantee in specific cases. Much of our interactions with
the file change service also changed so it doesn't matter, but
the .editorconfig library's use of the file watching service is causing
deadlocks in some scenarios. This change is a workaround to ensure
we don't start watching .editorconfig files on the background thread
in places where we need to ensure we don't touch the UI thread.

Ideally we'd be fixing the file change service itself to restore the
guarantee, but that's too risky of a change for our current needs and
isn't something we can do quickly enough to avoid customer issues.
Since we're rewriting our .editorconfig handling entirely which will
cause us to stop using the .editorconfig library (and by extension,
it's use of this problematic file change service path), we can do
this workaround now and let the problem go away on it's own soon when
we simply delete all of this.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/810494
上级 1e1ff520
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册