Skip to content

Commit

Permalink
Merge pull request #2597 from cyanfish/macinvoke
Browse files Browse the repository at this point in the history
Mac: Use InvokeOnMainThread instead of DispatchQueue
  • Loading branch information
cwensley authored Feb 26, 2024
2 parents dd18873 + 4aeb693 commit b07be37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Eto.Mac/Forms/ApplicationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ public void Invoke(Action action)
if (NSThread.IsMain)
action();
else
DispatchQueue.MainQueue.DispatchSync(action);
Control.InvokeOnMainThread(action);
}

public void AsyncInvoke(Action action)
{
DispatchQueue.MainQueue.DispatchAsync(action);
Control.BeginInvokeOnMainThread(action);
}

public void Restart()
Expand Down

0 comments on commit b07be37

Please sign in to comment.