Event queue
First Claim
1. A method of event management in a computing environment via an event queue comprising:
- inserting an item into the event queue, wherein the item corresponds to an event to be serviced;
determining whether an event thread is running; and
if it is determined that an event thread is running, forgoing the instantiation of an event thread, and otherwise instantiating an event thread to service the item inserted into the event queue.
2 Assignments
0 Petitions
Accused Products
Abstract
A novel system and method provide for event management utilizing a single thread or a limited plurality of threads to service queued events. When it is desired to add an event to the event queue, a thread is scheduled or acquired, such as from a thread pool, to service queue events unless such a thread is already active, or unless the current number of such threads equals or exceeds a preset thread limit when multiple threads are permitted. The use of a single thread, or alternatively a limited number of threads, to service the event queue leads to economy of system resources, and also avoids memory overflow due to thread proliferation. The limitation on the number of threads created to handle queued events assists in the avoidance of memory overflow complications. In addition, the elimination of threads that would otherwise occupy memory without providing substantial immediate results conserves system resources.
50 Citations
29 Claims
-
1. A method of event management in a computing environment via an event queue comprising:
-
inserting an item into the event queue, wherein the item corresponds to an event to be serviced;
determining whether an event thread is running; and
if it is determined that an event thread is running, forgoing the instantiation of an event thread, and otherwise instantiating an event thread to service the item inserted into the event queue. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method of managing events in a computing environment via an event queue comprising:
-
inserting an item into the event queue, wherein the item corresponds to an event to be serviced;
determining whether an event dispatch thread is running;
if it is determined that an event dispatch thread is not running, instantiating an event dispatch thread to service items of the event queue; and
if it is determined that an event dispatch thread is running;
determining a number of event dispatch threads currently running;
comparing the number of event dispatch threads currently running to a preset thread limit;
determining whether the number of event dispatch threads currently running equals or exceeds the preset thread limit; and
if the number of event dispatch threads currently running equals or exceeds the preset thread limit, forgoing the instantiation of an event dispatch thread, and otherwise instantiating an event dispatch thread to service items of the event queue. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A method of servicing an event comprising:
-
inserting an item into an event listing, wherein the item corresponds to the event, whereby the event listing contains an item corresponding to each of one or more events;
determining whether a thread for servicing any of the one or more events is running; and
starting a thread for servicing any of the one or more events it is determined that such a thread is not running, and otherwise not starting a thread for servicing any of the one or more events. - View Dependent Claims (14, 15, 16, 17, 18)
-
-
19. A method of servicing an event comprising:
-
placing an item into an event listing, wherein the item corresponds to an event to be serviced, and whereby the event listing contains an item corresponding to each of one or more events listed in their temporal order of insertion into the listing;
determining whether at least one thread for servicing any of the one or more events is running;
starting a thread for servicing any of the one or more events it is determined that at least one such thread is not running; and
if it is determined that at least one thread for servicing any of the one or more events is running;
determining a number of such threads currently running;
comparing the number of such threads currently running to a thread count maximum value, and thereby determining whether the number of such threads currently running equals or exceeds the thread count maximum value; and
if the number of such threads currently running equals or exceeds the thread count maximum value, forgoing starting another thread for servicing any of the one or more events, and otherwise starting a thread for servicing any of the one or more events. - View Dependent Claims (20, 21, 22)
-
-
23. A system for servicing events comprising:
-
an event queue comprising a listing of a plurality of events to be serviced; and
a single event handler thread for servicing the plurality of events one at a time. - View Dependent Claims (24, 25)
-
-
26. A computer-readable medium having thereon computer-readable instructions for performing a method of servicing an event, the method comprising:
-
placing an item into an event listing, wherein the item corresponds to an event to be serviced, and whereby the event listing contains an item corresponding to each of one or more events listed in their temporal order of insertion into the listing;
determining whether at least one thread for servicing any of the one or more events is running;
starting a thread for servicing any of the one or more events it is determined that at least one such thread is not running; and
if it is determined that at least one thread for servicing any of the one or more events is running;
determining a number of such threads currently running;
comparing the number of such threads currently running to a thread count maximum value, and thereby determining whether the number of such threads currently running equals or exceeds the thread count maximum value; and
if the number of such threads currently running equals or exceeds the thread count maximum value, forgoing starting another thread for servicing any of the one or more events, and otherwise starting a thread for servicing any of the one or more events. - View Dependent Claims (27)
-
-
28. A computer readable medium having thereon a data structure comprising:
-
an event queue field having stored therein an event queue comprising a listing of a plurality of events to be serviced; and
a thread structure corresponding to a single event handler thread for servicing the plurality of events one at a time. - View Dependent Claims (29)
-
Specification