this one helps. It is the same thing, SynchronizationContext.Post() calls BeginInvoke() and Send() calls Invoke(). The key property of SynchronizationContext is that there is more than one implementation of it. Important ones are WindowsFormsSynchronizationContext, it uses Control.Begin/Invoke and DispatcherSynchronizationContext, it uses Dispatcher.Begin/Invoke. There are others for ASP.NET, Windows Store (aka WinRT, aka Universal) apps, out-of-process servers that are COM+ hosted, etcetera.
it should still fix some issue Going strictly off the MSDN documentation then no, the SynchronizationContext.Post method is not thread-safe. So unless there is an error in the documentation then you will need to synchronize access to the method. I find hard to believe that it is not thread-safe myself, but you cannot bank on assumptions especially when dealing with thread synchronization issues. There really is no way around this until Microsoft either corrects the documentation or truly makes it thread-safe.
Should I use Invoke or SynchronizationContext to update form controls from another thread?
To fix this issue I prefer SynchronizationContext over Control.Invoke. The danger of Control.Invoke is that there is a lifetime issue with the owning Control. If the Control is disposed while you are trying to Invoke on it then it compromises the ability of the call to succeed. This happens when dialogs are closed, views shifted, etc ... SynchronizationContext.Current though generally lives as long as the thread it's associated with. It does have a finite lifetime and hence ultimately the same problems but it's a bit more predictable than a Control.
To fix this issue You need a delegate of type SendOrPostCallback. Which is pretty awkward, it only takes a single argument of type object. You definitely ought to look at the Task<> class available in .NET 4 to make this easier. Or use a lambda, like this:
may help you . In Winforms, No matter what method you call Form.Invoke, ISynchronizeInvoke.Invoke, SynchronizationContext.Send you are doing the same thing. In fact they all internally goes to the same method which is Control.Invoke(which implements ISynchronizeInvoke interface member).