[SOLVED] Re: Looking for performance-oneway asynch call
[SOLVED] Re: Looking for performance-oneway asynch call
- Subject: [SOLVED] Re: Looking for performance-oneway asynch call
- From: kubernan <email@hidden>
- Date: Fri, 1 Nov 2002 18:04:34 +0100
I just solved the performance problem, but i don't know
if the solution is a good idea.
old code : The client application opens a DO connection to the server
in the awakeFromNib
This connection is available for all methods of the window controller
that
creates a new request.
new code : Now, i create a new DO connection in each method call. Each
request has
its connection to the server and the synchronous response returns now
immediately.
Thx again for your help.
K.
Le vendredi, 1 nov 2002, ` 16:55 Europe/Paris, Lindsey Spratt a icrit :
>
Kubernan (is this a first name or a last name?),
>
>
Design snippet:
>
mainController
>
that runs in loop and receives client request
>
>
For each new request, check it and if the request
>
is in error, returns the error (synchronous).
>
>
If the request is available, create a new instance
>
of my own object and call a method in this instance.
>
>
In the new instance : create a new thread that do the stuff
>
for the client request. In the thread, informations of the work
>
are sent to the client using -(oneway void).
>
>
Is the main thread of the server waiting for the new thread that
>
services the client request to finish, or is it possible for the
>
server to spawn a thread to solve a client request and *while that
>
spawned thread is running* to get the next client request and spawn
>
another thread to service it, and so on? It's hard to tell from your
>
design sketch, but if the server main thread waits on the new
>
request-serving thread, this would be a problem.
>
>
Cheers,
>
Lindsey Spratt
>
http://homepage.mac.com/lspratt
>
_______________________________________________
>
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.
_______________________________________________
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.