> You are of course welcome to suggest ways to decrease the number of > threads because - as you have mentioned quite correctly - threads are > indeed expensive. Unfortunately in most cases it's either "use a thread" > or "write several hundred lines of code and not use a thread."
I generally loathe threads, I've written several non-blocking C++ applications which are single-threaded. They are both clean (basically event-driven, althouh on a slightly low level), efficient and very easily debuggable (no locking/synchronization problems). NIO in Java is a weird beast though, I can do this stuff easily in C++, but NIO is hard to use. I also dont know if NIO is applicable to UDP? --- John B?ckstrand
