On Sat, Sep 29, 2001 at 02:10:54PM -0400, Rocco Caputo wrote: > Does anyone rely on I/O events arriving out of order? Right now > they're dispatched without going through the queue, and it makes input > flow control tricky. > > I was thinking about changing the behavior, posting those events > through the queue after all. This would also simplify multi-user chat > and game servers that must synchronize data updates with user input > (causes) and asynchronous events (effects).
I would use a general locking mechanism that is applied to input events by defaults. I think this kind of locks is called barrier, only one event/ process is active, but unlike critical sections waiting events are processed in order. Barriers could be set even for handler groups. It could be implemented in sessions or in the main event dispatch code (waiting events not being taken from the queue). It would be faster if in sessions (divide and conquer) but session queues would be needed. Torvald
