What is difference between Invoke and Begin Invoke

Author Topic: What is difference between Invoke and Begin Invoke  (Read 3457 times)

Offline beingchinmayTopic starter

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 1
  • Posts: 73
  • Karma: 0
  • Gender: Male
  • I am Chinmay
    • Modular Kitchen Designer
  • Delegate.Invoke: Executes synchronously, on the same thread.
    Delegate.BeginInvoke: Executes asynchronously, on a threadpool thread.
    Control.Invoke: Executes on the UI thread, but calling thread waits for completion before continuing.
    Control.BeginInvoke: Executes on the UI thread, and calling thread doesn't wait for completion.
    BeginInvoke is asynchronous. When BeginInvoke is called from the UI thread the request will be executed
    in parallel with the UI thread. Which means it may not execute until after the currently executing method
    has returned. So in this case the text box will never appear to update because the for loop will not be interrupted, as the calling thread will not wait for this event to be completed before continuing


 

Related Topics

  Subject / Started by Replies Last post
21 Replies
16489 Views
Last post 12-04-2016, 23:34:48
by annarichart
34 Replies
24654 Views
Last post 03-25-2014, 06:13:10
by parijatziw
4 Replies
2916 Views
Last post 11-28-2012, 00:13:19
by DavisJoseph
5 Replies
8329 Views
Last post 04-19-2016, 00:25:36
by TomClarke
4 Replies
11275 Views
Last post 12-12-2022, 00:47:45
by digitalaachrya