开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜