0

I've read all recommended articles on SynchronizationContext, but there is one small question I did not find an answer for. In my case I have an event handler that calls a Log() method that outputs text to a TextBox. Log() is called from a WCF service. The event is raised from WCF client instances (threads). Usually, I check Control.InvokeRequired to be sure I am on the correct thread.

Do I still need to do that when using SynchronizationContext? In other words, can I always do a .Post() or .Send() even if I'm already on the correct thread?

Ian Ringrose
  • 51,220
  • 55
  • 213
  • 317
John
  • 3,591
  • 8
  • 44
  • 72

1 Answers1

0

Using Post or Send if you're already on the correct thread is not necessary, but it will work

Thomas Levesque
  • 286,951
  • 70
  • 623
  • 758