Patent ID: 8572617

Claim:
A computer-implemented method, comprising: initializing a group of multiple threads in a computer system, wherein the group of multiple threads execute in a multi-thread environment; synchronizing the group of multiple threads by restricting one thread of the group from executing until multiple event conditions are satisfied, wherein each of the multiple event conditions corresponds to a different one of the multiple events; initializing multiple event objects, wherein each of the multiple event objects stores information about a different one of the multiple events and a corresponding event condition, and wherein each of the multiple event objects is associated with multiple methods including a wait method for updating and accessing the event condition information stored by the object; registering the multiple event objects, wherein registering an event object includes using the wait method to perform a wait operation to determine a status of an event by referencing an event condition information corresponding to the event stored by the event object and generating and storing a pointer associated with the event object; initializing a wait data structure, wherein the wait data structure holds a counter, wherein the counter is configured to indicate when all of the multiple event conditions are satisfied, and wherein initializing includes linking a pointer to the wait data structure; associating the one restricted thread of the group with the wait data structure; updating the counter when an event condition is satisfied; determining that all of the multiple event conditions are satisfied when the counter value reaches zero; and in response to determining that all of the multiple event conditions are satisfied, ceasing to restrict the one thread of the group from executing.