Skip to content

Commit

Permalink
Switch to UI thread on SetText call
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Gołębiowski committed Feb 3, 2025
1 parent c3bae1c commit 5227a64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Cody.VisualStudio/Services/StatusbarService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ public class StatusbarService : IStatusbarService
{
public void SetText(string text)
{
ThreadHelper.JoinableTaskFactory.Run(delegate
ThreadHelper.JoinableTaskFactory.Run(async delegate
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

var statusBar = (IVsStatusbar)Package.GetGlobalService(typeof(SVsStatusbar));
int frozen;

Expand Down

0 comments on commit 5227a64

Please sign in to comment.