摘要 |
A technique in accordance with one embodiment of the invention uses an adaptive algorithm to obtain UDAPL event messages. According to one aspect, a process repetitively performs the following steps as long as the process expects to receive at least one event message. By polling the event message queue at least once, the process determines whether the queue is empty. If the queue is empty, then the process blocks until specified criteria have been satisfied. Alternatively, if the queue is not empty, the process reads an event message from the queue. After the process has either read an event message from the event message queue or finished blocking, the foregoing steps are repeated if the process still expects to receive at least one more event message. According to one aspect, when the process blocks, the process blocks only until a specified number of event messages have arrived in the queue.
|