uLan/Universal Light Event Poll Library (ULEVPOLL) | ||
---|---|---|
Prev | Chapter 1. Event Processing Library Concepts | Next |
The other interesting feature is to be able to switch or cascade event monitoring at runtime when some third party library enforcing different main loop implementation is dynamically loaded. This goal has been achieved by uLevPoll as well. Next complex scenarios works now
start application with Linux epoll or Sys V poll base, when GLIB based library is required, create new uLevPoll based on GLIB, cascade original set with epoll above it (or transform Sys V poll triggers to GLIB based ones in new main loop) and continue to run with GLIB main loop.
start with GLIB base, wrap it as uLevPoll base and when GLIB scalability fails, create new uLevPoll based on Linux epoll which can be cascaded into GLIB main loop and use this new better scalling base for most of the evenets registration.
The events can be inserted by GLIB based applications as glib event sources, by uLUt based applications as ul_evpoll events into uLevPoll wrapper or over original sysvpoll or lnxepoll event bases and all runs concurrently without noticing real bottom base in use. The Linus epoll cascaded over GLIB base can corrects GLIB ill behavior for C10K problem for these events, which are registered over uLevPoll API as ul_evptrig_t into epoll based ul_evpbase_t.