Patent ID: 7577712

Claim:
A machine-implemented method for obtaining event messages, the method comprising: (a) if receipt of at least one event message is expected, then determining whether an event message queue is empty; (b) in response to a determination that the event message queue is not empty, a processor performing steps comprising: reading at least one event message from the event message queue; and repeating at least step (a); and (c) in response to a determination that the event message queue is empty, the processor performing steps comprising: blocking until specified criteria have been satisfied; and after the specified criteria have been satisfied, repeating at least step (a); wherein at least one condition from a set of conditions is true, wherein the set of conditions consists of: (1) wherein the step of blocking until the specified criteria have been satisfied comprises invoking a User Direct Access Programming Library (UDAPL) dat_evd_wait method and passing, as parameters to the UDAPL dat_evd_wait method, both (i) a value that indicates a quantity of event messages that a process still expects to receive, and (ii) a pointer to a variable into which the UDAPL dat_evd_wait method will insert a quantity of event messages that are in the event message queue when the UDAPL dat_evd_wait method returns; (2) wherein the step of reading at least one event message from the event message queue comprises invoking a User Direct Access Programming Library (UDAPL) dat_evd_dequeue method; and (3) wherein the step of determining whether the event message queue is empty comprises invoking a User Direct Access Programming Library (UDAPL) dat_evd_dequeue method at least a specified number of times before blocking, and wherein the specified number of times is at least two.