Re: [CODE][BUG] Missed Pulses.

From: Luis Pedro Passos Carvalho (lpcarvalho@SONAE.PT)
Date: 03/13/98


-----Original Message-----
From: Chris Jacobson <fear@ATHENET.NET>
To: CIRCLE@POST.QUEENSU.CA <CIRCLE@POST.QUEENSU.CA>
Date: Friday, March 13, 1998 5:57 PM
Subject: Re:  [CODE][BUG] Missed Pulses.


>On 3/13/98 10:19 AM, Luis Pedro Passos Carvalho (lpcarvalho@SONAE.PT)
>stated:
>
>>The other one is making clean_events/run_events be aware of each other in
>>order to be resistant to that
>>kind of ocurrence. I'll look into it this afternoon.
>
>Even easier solution: remove the event from the list as soon as it is
>decided it is to be processed.  This way the "current event" (which will
>be freed by run_events() itself) is not even seen by clean_events().  No
>need to worry about the contents of the event structure - they are mere
>pointers, and are never touched/freed (which can cause memory leaks in
>the case of allocated data being pointed to by the info member of an
>event during clean_events()).
>


That way you don't solve the problem, you just move it to the next event in
line to be processed.
run_events saves the next event to be processed in a local variable, deletes
the current one then runs it.
If the next event is free'ed when you go back to run_events you still have a
problem the event you want
doesn't exist. :(

I'm going to redesing the event system anyway, might as well have that into
account.

See ya all,

Luis Carvalho


     +------------------------------------------------------------+
     | 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/15/00 PST