MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Event Scheduling
[J C Lawrence:]
> Mine is written in C++, with a standard STL priority queue for
> pending events in botht he Dispatchor and Executor, and short
> circuit evaluation (ie never hits the priority queue) for those
> incoming entries that are adjudged as being already ripe, or will be
> ripe by the time they reach a waiting thread (if a thread is ready).
> This saves the (occassionally) non-trivial insertion cost as well as
> lock contention on the queues.
Do you handle any currently-ripe entries in the queue before any new
tasks that are immediately ripe? You likely want to do that to avoid
starvation in cases of server overload.
I didn't reply to the original question, since my event queue is simply
a sorted linked list, hence my insert time is O(n), and my delete time
is O(1). Manipulation of that queue has never shown up in my profiling,
however - it's time is tiny compared to actually executing the events.
--
Don't design inefficiency in - it'll happen in the implementation.
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA
http://www.GraySage.Edmonton.AB.CA/cg/
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
http://www.kanga.nu/lists/listinfo/mud-dev
- Thread context:
- Re: [MUD-Dev] Event Scheduling, (continued)
- Re: [MUD-Dev] Event Scheduling,
J C Lawrence claw#kanga,nu, Tue 08 Feb 2000, 18:31 GMT
- Re: [MUD-Dev] Event Scheduling,
cg cg#ami-cg,GraySage.Edmonton.AB.CA, Wed 09 Feb 2000, 04:38 GMT
- Re: [MUD-Dev] Event Scheduling,
Cynbe ru Taren cynbe#muq,org, Wed 09 Feb 2000, 04:38 GMT
- Re: [MUD-Dev] Event Scheduling,
Cynbe ru Taren cynbe#muq,org, Wed 09 Feb 2000, 19:02 GMT
[ Other Periods
| Other mailing lists
| Search
]