I don't believe there's a way for you to determine if the event manager
queue is filling up. My suggestion is that you always add things to the
meta-queue, and always keep track of whether or not one of your meta-events
is in the event manager queue. If not, take one item off of your meta-queue
and add it to the event manager queue. Later, after you handle that event,
take another item off the meta-queue and post it. Keep doing that for as
long as there are items in your meta-queue.
Don't try to keep the event manager queue as full as possible. Doing so
would cause other clients of that queue to run into the same problem you
ran into ("...at which time it is too late.").
-- Keith
Sanjay S Vakil <[EMAIL PROTECTED]> on 04/18/99 07:13:54 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc: (Keith Rollin/HQ/3Com)
Subject: event queue overflows / event queue length?
Hi there. I'm using the event queue as a location for message passing
from serial callbacks.
It is possible to end up with "too many" events on the queue: ie, more
than that defined length of the queue.
I've set up a slick little "meta-queue" which can store extra events
away and re-inject them into the standard queue using the supported API
except for one thing: there does not seem to be a supported way to find
out how many events are pending. I want to shunt stuff to the
meta-queue when the real one is filling up, but I cannot find out when
the real one is filling up besides the system throwing an error (at
which point it is too late).
Is there a supported way to do this? Can there be in the future?
Thanks,
Sanjay