Dispatcher BeginInvoke/EndInvoke

Michael 41 Reputation points
2021-03-08T13:51:59.37+00:00

In .Net Core and the future BeginInvoke/EndInvoke are no longer. A lot is written on this as it applies to threads outside of the dispatcher. What about inside it? I cannot find anything on how it has been effected. Dispatcher.BeginInvoke still works.

Developer technologies | Windows Presentation Foundation
Developer technologies | .NET | .NET Runtime
0 comments No comments
{count} votes

Answer accepted by question author
  1. DaisyTian-1203 11,651 Reputation points Moderator
    2021-03-09T08:48:29.797+00:00

    Dispatcher.BeginInvoke applies to .NET 5.0 and other versions, you can see the applied table in part Applies to at the bottom of the document.

    BeginInvoke/EndInvoke delegate calls are not supported in .NET Core.
    The APM (using IAsyncResult and BeginInvoke) is no longer the preferred method of making asynchronous calls. And the implementation of async delegates depends on remoting features not present in .NET Core, so BeginInvoke and EndInvoke delegate calls are not supported in .NET Core. You can refer to Microsoft .Net Blog Migrating Delegate.BeginInvoke Calls for .NET Core for more details. If I misunderstand your question, please point out and give me more detailed info to analyze.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.