Does Control.Invoke pump messages?
Does Control.Invoke() continue to pump messages in the thread that it wa开发者_StackOverflows called from while blocked? (System.Windows.Forms)
No. Invoke is blocking - the entire thread will block until the call to Invoke returns.
There is also BeginInvoke which is non-blocking.
No. It requires the UI thread to do the pumping. If it doesn't then Invoke() won't complete. Classic source of deadlock btw. Diagnose with Debug + Windows + Threads, check the main thread call stack.
精彩评论