[DGD] 3 golden rules for MP
Steve Wooster
sw_mlists at xprt.net
Tue Apr 5 00:19:01 CEST 2005
At 02:21 PM 4/4/2005, you wrote:
>1) Try to modify as few objects as possible in a single execution round,
> other than the object you start in.
>2) Try to avoid modifying the object you add a callout for. If possible,
> delay modification until when the callout actually executes.
>3) Avoid starting all execution rounds from the same small set of objects.
>
>About terminology: I decided to call the time slice during which an LPC
>event program is running an "execution round". It's not really a thread,
>and talking about them as "threads" confuses the issue when you also have
>to deal with actual threads.
>
>Regards,
>Dworkin
Thank you for the official suggestions. :) I've been trying to figure out
what is/isn't ok.
I'm not sure I understand 2.
For 3, what about a heartbeat-ish daemon for objects in combat to ensure
that objects which take more CPU don't end up with less rounds of combat,
or healing more slowly/etc? Would that just be a necessary evil to ensure
that certain types of actions occur at the same speed? More importantly, is
there a better way to do that than to have it notify each object using a
different time-slice (using call_out with a delay of 0), then do a call_out
for the next round?
Thanks!
-Steve Wooster
More information about the DGD
mailing list