There is no straightforward way to make the code in Listing 1 thread-safe, making this idiom an accident waiting to happen.
没有直观的途径来使 清单 1 中的代码是线程安全的,这使这种语言风格成为了一种等待时机发生的事故。
The inversion of priorities delays both the low- and the high-priority thread from making progress.
优先级反转将延迟低优先级线程和高优先级线程的执行。
If your action is to update a UI component, then ensure you are in the UI thread when making the call to update a label or UI control.
如果操作的目的是更新ui组件,那么通过调用来更新标签或UI控件时,请确保正处在UI线程中。
应用推荐