From: Martin H. <ma...@he...> - 2004-03-13 18:27:56
|
Hi Xavier, > I know, but this will be quite complicated, so I'm beginning the search > help for this. > Another issue is the slow plugins (mysql, web, mail, ...), which we'll > have to put in threads. A friend of mine recommended me to use C++ class > Thread insted of fork(), which will increase a lot memory footprint. > I fact, we won't have to port lcd4linux to C++, just just introduce a > little 'glue' to use these class. Should I go deeper in this way or do > you _definitely_ want l4l to stay pure C ? I obviously can't speak for Michael, but I surely hope he's going to keep it pure C - since my target platform doesn't even have the c++ libs installed (so, it would _hugely_ increase the memory footprint). Besides, I fail to see why one would need c++, just to be able to use plain threads. While I've never coded threads in c under linux (I have done so on other operating systems), I don't really see the huge benefit of using c++ (apart from the fact that it's slightly easier to use, but that probably would be lost in the glue-code). I guess if we actually start using threads, things could get ugly quickly (with all the changes happening at the moment between different kernel versions at the moment - mainly nptl-related), so I must say I like Michael's approach of "old fashioned" fork and IPC (via shared-mem, sockets, pipes, whatever). It's surely not the most efficient way, but nobody's going to check the inbox every couple of miliseconds anyway. Martin |