On Mon, Jun 04, 2001 at 12:37:15PM -0700, Wilkinson, Mike wrote:
> I'm writing some complex state machines which require quite a bit of state
> queuing. My question is using what methodology does POE choose what state of
> which machine it runs next, if there are various types of event traffic
> involved at the same time? For example, say in a given state I issue a few
that depends on the event loop. check POE/Kernel/* and pick the one you use,
for poe's loop this seems to be select first, then alarms, then normal fifo
events.
> yields, alarms, and signals. Furthermore, there may also be yields, alarms,
> and signals that where enqueued by previous states, that have not been
> processed yet. In what order (if any) would the POE kernel go about
> processing these requests, past and present? Also, beyond just alarms, is
> there some way of looking at this "queue list" and see in advance to what
> session and state I'm going next (and beyond)?
events should reach sessions in the order they were sent. anything else would
make no sense. i don't think you should rely on anything else.
and i don't think there is an official interface for working with the event
fifo, you shouldn't do it anyway. try to find a cleaner way or say a bit more
about what you're trying to do.
the type of state machine that poe sessions implement isn't made for reading
more input (events) than just the first from the fifo. If you have different
related events pack them together or use the heap to keep track of the state.
torvald