In Silverlight, we want to use call to call UI thread My question is, do many sources call a function, who do this, are these calls queued and executed one after another? If so, can I safely assume that even if the function is being called from multiple threads, code inside Code thread is protected when it has no status, does not modify the state to be shared The thread modifies the state across boundaries or in a controlled way so that all users of that state are shared to ensure thread protection (such as locks). Therefore, there is no guarantee of thread protection, he said, it is a guarantee that the representatives will run on all the same threads (UI threads) so you can assume that the representatives will not run together. It does not mean that they are naturally thread-protected - it depends on you in those representatives - but if you do not spin or interact with other representatives from those representatives or those representatives called by those representatives , You might consider thread-protection this.Dispatcher.BeginInvoke ( (Threadstart) representative () {}) .
this.Dispatcher.BeginInvoke (ThreadStart) representative () {}); Thread is safe?
Comments
Post a Comment