Degree of multithreading in a server app
Degree of multithreading in a server app
- Subject: Degree of multithreading in a server app
- From: Hisaoki Nishida <email@hidden>
- Date: Mon, 6 Jan 2003 23:23:52 -0500
Hi,
I was wondering if having 4 or more threads in a single application
would do harm in any way.
In my sever model, I have a delegate object D, which, in a separate
thread, creates a server object, S.
During the init stage of S, it forks another thread in which the
listener object, L, is created and run.
L listens for incoming connections and notifies S (via NSNotification)
when a new connection is detected. but S is then running its main
infinite server loop which handles existing connections, and has no
chance to receive the notification. Or does it? I'm not sure.
The solution I have in mind is to run the main server loop in another
separate thread. That way S's main thread can handle notifications.
This should work i think, but if there is a better solution, I'd be
interested to know.
Thanks.
-Yuki
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.