IO multiplexing in Linux
Question is some what philosophical. I'm programming small progz, mostly for communication, data collecting on Linux more then 4 years. Before I've used windows.
In windows (NT 4.0, W2K Prof and XP) I used IO completion queue, it's with my own FiFo code (really a double linked list) allowed me to build very simple, modular interfaces to sockets, serial ports and files. Everything goes through thread safe FiFo and push/pull any packets from one channel to other seem very similar.
I can not find anything analog in Linux, my best try was using select and working thread for it. Every "channels" have their own thread and FiFo, but at this point I need signals and timers, what need driven me to use liboop which integrate all of them to me, with a more or less similar, convenient interface. But seem to be I was wrong. I can not reach appropriate modularity. Seem to be liboop does not like/support multithreading, as signal handling also could work only in main process, which also mean alarm timer have same problem.
What is the right way to build, simple, flexible and convenient interfaces for higher level prog in Linux, what is the right way?
|