Skip to content

Commit 7e02130

Browse files
No reason to throw here - it's the lambda that needs the UI thread
1 parent 66605e8 commit 7e02130

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Vsix/BlockingOleMenuCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ internal class BlockingOleMenuCommand
1111

1212
private static EventHandler WaitFor(Func<object, EventArgs, Task> task)
1313
{
14-
ThreadHelper.ThrowIfNotOnUIThread();
15-
return (o, a) => ThreadHelper.JoinableTaskFactory.Run(() => task(o,a));
14+
return (o, a) => {
15+
ThreadHelper.JoinableTaskFactory.Run(() => task(o, a));
16+
};
1617
}
1718

1819
public BlockingOleMenuCommand(Func<object, EventArgs, Task> invokeHandler, CommandID id)

0 commit comments

Comments
 (0)