سؤال

I know multithreading is ideal for this situation, but would there be any instance of where this situation could be applicable?

هل كانت مفيدة؟

المحلول

Yes you could be serving multiple clients at once from a single thread. This is typically implemented using the select() or poll() socket functions.

A single threaded select() based polling server can use less system resources than a multi-threaded server.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top