ISynchronizeInvoke in .NET

Explain the use of ISynchronizeInvoke in a cross-thread call in .NET?

0
source share
1 answer

It is simply an interface that contains appropriate methods for:

  • Check if special handling is required ( InvokeRequired)
  • Call the delegate safely from another thread, blocking until the action completes ( Invoke)
  • Call the delegate safely from another thread returning immediately without blocking ( BeginInvokewhich may be associated with EndInvoketo get the result later)

The most common implementation is Controlin Windows Forms.

, . . ISynchronizeInvoke Control, , - .

: :

, ISynchronizeInvoke . SynchronizationContext . Control ; Microsoft.

+9

All Articles