Processor-implemented systems and methods for event handling
AssigneeSAS Institute Inc.
InventorCharles Scott Shorb
Life of this patent
Estimating the term…
Abstract
Processor-implemented systems and methods are provided for synchronization of a thread, wherein the thread waits for one or more events to occur before continuing execution. A processor-implemented system and method can include a wait data structure which stores event conditions in order to determine when the thread should continue execution. Event objects, executing on one or more data processors, allow for thread synchronization. A pointer is stored with respect to a wait data structure in order to provide visibility of event conditions to the event objects. The thread continues execution when the stored event conditions are satisfied.
Claims18
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.
A system, comprising:
- one or more data processors;
- and
- one or more non transitory computer-readable storage media containing instructions configured to cause the one or more processors to perform operations including:
- 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.
A computer-program product tangibly embodied in a non-transitory machine readable storage medium, and including instructions configured to cause a data processing apparatus to perform operations including:
- 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.
Dependencies are inferred from the claim text.