Ask Your Question
3

What is the order of execution for Control.BeginInvoke?

asked 2023-06-06 23:26:25 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-06 23:28:02 +0000

plato gravatar image

When Control.BeginInvoke is called, the following sequence of events occur:

  1. The delegate object is added to the message queue of the UI thread.
  2. The UI thread checks the message queue for pending delegate objects.
  3. When the delegate object is at the front of the message queue, the UI thread dequeues it and executes it.
  4. The delegate object's return value (if any) is discarded.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-06 23:26:25 +0000

Seen: 20 times

Last updated: Jun 06 '23