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.
--Angus

______________________________ Forward Header __________________________________
Subject:  Remembering Names, also Event Queues
Author:  INTERNET:CIRCLE@post.queensu.ca at CSERVE
Date:    11/8/97 4:12 PM

ObCircle:
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
sa-search.massey.ac.nz where someone posted examples of this type event
queing, but i can never get connected (always times out)...so 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..

siv


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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