How does the Event Thread know there are pending updates?
Event Thread如何知道存在未决的更新呢?
The second thread can interact with the Event thread by using a staging area and a timer.
第二个线程可以通过一个中间区域(staging area)和一个计时器,与Event Thread进行交互。
Then the Event Thread will take the updates, merge them into the existing data, and show the results.
然后,Event Thread将获取更新,将其与现有的数据合并,然后显示结果。
If you need a delay like this, use a Swing Timer so you don't shut down the event thread during the sleep.
如果你需要一个延迟,这样,使用摆动定时器,所以你不要关闭事件线程在睡眠。
A better approach is to start a timer, and have timer poke the event thread every so often to go look at the staging area for updates.
更好的方法是启动计时器,并且使计时器不时地提醒事件线程去查看中间区域,以寻找更新。
Application manager threw an uncaught exception The application manager event thread threw an uncaught exception and cannot continue execution.
应用程序管理器遭遇一个固有程序故障导致无法继续执行。
AWT and Swing use this model, in which there is a GUI event thread, and all work that causes changes in the user interface must execute in that thread.
AWT和Swing就使用这个模型,在这个模型中有一个GUI事件线程,导致用户界面发生变化的所有工作都必须在该线程中执行。
This is because remote invocations in JSR 172 are blocking calls, and if invoked in the main event thread, the user interface will freeze until the remote invocation completes.
由于JSR 172中的远程调用是按模块进行的,而且如果在主事件线程中调用,用户界面会冻结,直到远程调用结束。
The idea is to dump the trace immediately after the problem occurs, then to turn tracing off and, finally, to format the event data either chronologically or by process or thread.
其方法是,在问题出现后,立即转储跟踪信息,然后关闭跟踪,最后按照时间顺序或者按照进程或线程来格式化事件数据。
Asynchronous processing allows more time for each event without tying up the requesting thread.
异步处理允许在每个事件上花更多的时间,而无需占用请求线程。
The wait function on the event object blocks the calling thread until its state is set to signaled state.
对事件对象调用的等待函数会阻塞调用线程,直到其状态被设置为有信号状态为止。
This is because a group with the same primary keys raises one thread of event delivery.
这是因为主键相同的分组发起一个事件交付线程。
Typically, such an application is split into several event loops, each residing in its own thread.
通常,这种应用程序被分为若干个事件循环,每个循环都有自己独有的线程。
In this way, one event generates a thread of event delivery and thus many threads are running simultaneously.
这样,一个事件将生成一个事件交付线程,因此许多线程将同时运行。
You may also choose to use this thread for performing other tasks such as event logging.
你也可以利用这个线程来执行其它任务,比如事件记录。
If your application has a button to cancel a long-running operation but you're doing work in the UI thread, the cancellation event won't be delivered until after the operation has finished!
如果应用程序有一个按钮用于取消某个长时间运行的操作,而您正在使用UI线程执行操作,那么这个取消事件只有到UI线程所做的操作完成后才会被处理!
The event handler will be blocked until the UI thread is able to process it.
事件处理函数将被阻塞直到UI线程能够处理它。
Just like the rest of the code in a typical Windows Forms application, any code that resides inside a timer event handler (for this type of timer class) is executed using the application's UI thread.
就像一个典型窗体程序里的其它代码一样,任何驻留在一个定时器事件处理函数(指的是该类型的定时器类)中的代码也是使用应用程序的UI线程所执行。
The code for your event handler is now running on the UI thread and, as long as your code is running, the UI thread can't respond to other UI events.
事件的处理代码现在运行于ui线程,而且只要这段代码在运行,UI线程就无法对其他UI事件作出响应。
Moreover, the Manager calls notify to wake up the service delegate? S thread so that the arriving event can be processed.
此外,Manager调用notify以唤醒服务委托的线程,以便能够处理到达的事件。
Instead of spawning a new OS thread for each connection (and allocating the accompanying memory with it), each connection fires an event run within the Node engine's process.
每个连接发射一个在Node引擎的进程中运行的事件,而不是为每个连接生成一个新的OS线程(并为其分配一些配套内存)。
In the auto reset event, the state of the object remains signaled until a single waiting thread is released.
在自动重置事件(auto reset event)中,对象的状态会一直维持为有信号状态,直到单个正在等待的线程被释放为止。
Because this class supports access from different threads, it is conceivable that the Stop method may be called on a thread other than the thread that is used for the Elapsed event.
因为这个类支持不同线程的访问,除了时间消失事件所在的线程,应该相信它的Stop方法能够被其它线程所调用。
The biggest difference is that System.Timers.Timer is a wrapper around Win32 waitable timer objects and raises an Elapsed event on a worker thread rather than a Tick event on the UI thread.
最大的区别就在与System.Timers.Timer类是对Win32可等待定时对象的一个包装,并在工作者线程上产生一个时间片消失事件而不是在UI线程上产生一个时间标记事件。
For the function in Listing 2, extract the data property of the event, as this is the actual data sent by the thread, and pass it to another function for updating the UI.
对于清单2中的这个函数,提取event的data属性,因为这是被线程发送的实际数据,然后将它发送给另一个函数来更新ui。
Db2extev (external event handler thread) : The same as SIGUSR2.
db 2 extev(外部事件处理程序线程):与SIGUSR2相同。
Each thread can then handle its event using a synchronous programming model.
每一个线程能处理他的事件用同步的程序模型。
In the classic servlet model, an open connection means a dedicated thread is doing nothing but waiting until it needs to update the client in response to an event.
在典型的servlet模型中,一个打开的连接意味着一个不执行任何操作的专用线程,它将一直等待,直到在响应事件时更新客户端。
Our main thread waits on an event that is signaled when input is dying.
我们的主线程一直等待输入任务单元结束时产生的事件信号。
In multiple-threaded dispatching model, the thread fetching the events from the queue launches another thread called task thread, and hand the event over to it for processing.
在多线程分发模型中,从队列中获取事件的线程启动另一个被称作任务线程的线程,并把事件交给它处理。
应用推荐