Make default implementation of GetRootAsync return the root node synchronously...
Make default implementation of GetRootAsync return the root node synchronously (rather than calling Task.Factory.StartNew). SyntaxTree implementions that want to schedule work concurrently, etc, should override GetRootAsync. Calling Task.Factory.StartNew with an arbitrary (current) scheduler may cause deadlocks. Consider the case where some code calls GetRootAsync, and that method returns before the Task returned by StartNew is actually scheduled/executed. If the caller subsequently calls Task.Wait, and the scheduler decides to "inline" the execution of the Task (execute on the same thread), then there will be a deadlock. (changeset 1407810)
Showing
想要评论请 注册 或 登录