lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Mike Pall and I are working on an alternative to the select function
> that doesn't suffer from most of its shortcommings. I will keep this in
> mind and see if it is possible to make this new interface easy to extend
> in the C side. For now, the select function will stay where it is.

The ACE Reactor (http://www.cs.wustl.edu/~schmidt/PDF/reactor-rules.pdf)
exemplifies a great design pattern, where pluggable code supplies the
"waitable/selectable/pollable" handle to the reactor and the pluggable
code gets notified of events happening on these handles. It works great
for single threaded applications. The reactor abstracts away different
implementations underneath a common interface.

The PERL POE (http://poe.perl.org/) framework goes one step further and
allows plug-in code to create custom handles that are not natively 
"waitable/selectable/pollable" and thus integrate such custom handles
into something similar to the ACE Reactor (Caveat: I have not fully 
read the details of POE, and hence may be not be accurate - although
it is still a cool idea to consider).

Just an FYI for your design consideration.

cheers
Vijay Aswadhati