c# – WPF调度程序BeginInvoke订购保证

c# – WPF调度程序BeginInvoke订购保证,第1张

概述如果我打电话 Dispatcher.BeginInvoke(operation, DispatcherPriority.Loaded) 来自20多个线程的1,000,000次,这些1,000,000次 *** 作是否按照BeginInvoke调用的顺序由UI线程执行? msdn说 If multiple BeginInvoke calls are made at the same DispatcherPr 如果我打电话
dispatcher.BeginInvoke(operation,dispatcherPriority.Loaded)

来自20多个线程的1,000,000次,这些1,000次 *** 作是否按照BeginInvoke调用的顺序由UI线程执行?

解决方法 msdn说 If multiple BeginInvoke calls are made at the same DispatcherPriority,they will be executed in the order the calls were made

但是如果您从多线程Any instance members are not guaranteed to be thread safe.访问调度程序

总结

以上是内存溢出为你收集整理的c# – WPF调度程序BeginInvoke订购保证全部内容,希望文章能够帮你解决c# – WPF调度程序BeginInvoke订购保证所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1236604.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-06
下一篇2022-06-06

发表评论

登录后才能评论

评论列表(0条)

    保存