Avoiding long-running actions in the UI thread.
避免UI线程中的长时间运行动作。
Identifying long-running actions in the UI thread.
确定UI线程中的长时间运行动作。
Most modern operating systems have a single UI thread.
绝大多数现代操作系统都有一个单独的ui线程。
This step is done to avoid blocking the main UI thread.
这一步是为了避免阻塞主ui线程。
Do not assume you can populate the table on the UI thread.
不要指望您能在UI线程中填充该表。
You can now launch JUnit Plug-in tests in a non-UI thread.
你现可以在非ui线程中启动JunitPlug - in测试。
As such, the main thread is also sometimes called the UI thread.
因此,主线程有时也被叫做UI线程。
You can then run the task by calling execute from the UI thread.
然后就可以在UI线程中调用execute来执行任务了。
This is another good reason not to stay running on the UI thread.
这是不在UI线程上运行pluglet的另一个不错的理由。
That's why slow and unpredictable I/O is a problem on the UI thread.
上述情形说明了为什么UI线程上的缓慢和无法预期的I/O 会造成问题。
As you can see, it didn't skip a beat-even when the UI thread was sleeping.
正如你所看到的,它不会跳过一个跳动——即使UI线程在睡眠。
You have a couple of choices in moving your pluglet code off the UI thread.
对于将pluglet代码从UI线程上去掉有两种选择。
The event handler will be blocked until the UI thread is able to process it.
事件处理函数将被阻塞直到UI线程能够处理它。
Thus, addStock will execute on a background thread, not on the main UI thread.
如此,addStock将在一个背景线程上执行,而不是在主UI 线程上。
Instead, the timer remained in a suspended state while the UI thread was sleeping.
然而,当UI线程在睡眠时定时器却保持挂起状态。
The spawned thread does not have access to the same resources as the main UI thread.
衍生线程不能访问主ui线程访问的资源。
A pluglet running on the UI thread invoked an API that blocked waiting for a result.
在UI线程上运行的pluglet调用了阻塞等待结果的API。
The UI thread dequeues the request and notifies the widget that it should redraw itself.
UI线程从队列中取出此请求,并通知widget重绘自己。
Throughput - 5.5 times higher for the UI thread and 870 times higher for the worker thread.
对于UI线程来说提升了5.5倍,对于worker线程来说提升了870倍。
This method will always be executed on the main UI thread, so it is ideal for modifying the UI.
这个方法总是在主ui线程上被执行,因此对于修改UI这是一个很好的选择。
This resulted in the deadlock, because the UI thread was blocked waiting for the API to return.
这导致了这样的僵局,因为UI线程不再等待API的返回。
The UI thread processes these messages whenever your application isn't busy doing something else.
无论何时你的程序不忙于做其它事情时该U I线程就处理这些消息。
When a pluglet is executed, it runs on the Rational Software Architect (User Interface) UI thread.
当运行pluglet 时,它在RationalSoftware Architect(用户界面)UI 线程上运行。
It abstracts out the creation of a thread and a handler for making a request off of the main UI thread.
它抽象出线程和处理程序的创建,用于请求主ui线程。
To summarize, it's vital to the responsiveness of your application's UI to keep the UI thread unblocked.
总而言之,保证你的UI不被阻塞对于应用程序的响应来说是十分重要的。
Pretty much any kind of external service is going to require an asynchronous call that returns on the UI thread.
几乎任何类型的外部服务都需要一个返回UI线程的异步调用。
The point here is that if your code is running on the UI thread, the application can't handle UI events from the OS.
问题的重点在于如果UI线程在运行您的代码,应用程序将无法再处理来自OS的UI事件。
To avoid tempting fate, you must perform tasks like these on a different thread, or at least not on the main UI thread.
为了避免冒险,您必须在不同的线程上执行任务,或者至少不在主ui线程上执行。
During idle time, the UI thread is also responsible for processing all messages in the application's Windows message queue.
在空闲时候,该UI线程同样要对应用程序的窗体消息队列中的所有消息进行负责。
In fact, the code in the spawned thread cannot even be in the same file as the code that is executed by the main UI thread.
事实上,衍生线程中的代码甚至不能与主ui线程执行的代码位于同一个文件中。
应用推荐