摘要 |
A main processing thread in a handheld computer processes user input messages and e-mail messages. A second thread is created from the main thread. The main thread has a user input queue for user input messages, and the second thread having a notification queue for e-mail notification messages. The user input messages in the user input queue are processed until the user input queue is empty. A notification send ON signal is sent from the main thread to the second thread after the user input queue is empty. The notification send ON signal indicates when the main thread is available to process e-mail notification messages. The main thread retrieves and processes e-mail notification messages sent from the second thread after the notification send ON signal has been sent from the main thread until the user input queue is no longer empty. When the user input queue is no longer empty, a notification send OFF signal is sent from the main thread, and user input messages are processed by the main thread.
|