Remembering Names, also Event Queues

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 11/10/97

Siv, what ever you do, do not decrement each entry for each time you run through
the list.  have the list time ordered and have the entry be the absolute pulse
of execution.  then, when you are running the jobs, just execute the ones that
have that time or up to 20 less (for the wrap around of pulses). when you
insert, seach the list for the appropriate place and stick it in front of the
1st entry that has the right time.

______________________________ Forward Header __________________________________
Subject:  Remembering Names, also Event Queues
Author: at CSERVE
Date:    11/8/97 4:12 PM

i implemented an event system that will create a linked list of events,
and each second, decrement the number of seconds until the event is
supposed to fire off..when that reaches zero, it runs the event...there was
some discussion of using a hash table instead, and using the actual value
of the pulse clock to determine when the event should go off..i checked
out the site that Erwin (?) suggested, and there was a link to where someone posted examples of this type event
queing, but i can never get connected (always times out) i was
wondering if there was anyone on this list who would mind going over
this kind of system, since i'm unfamiliar with hash tables and i would
rather not have to run through a huge list every second..


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST