Re: concurrent



>I am a beginner,hlp me pls.
>in the echo-server.c, I add sleep function as below.
>do_EchoString(.....)
>{
> ...
> ...
> fprintf ( stdout,"enter do_EchoString\n" );
> sleep(10);
> ...
> ...
> fprintf ( stdout,"leave do_EchoString\n\n" );
>}
>and run the following command :
>   $echo-client 1 IOR:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx &;echo-client 1 
IOR:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx &
>
>server's output:
>enter do_EchoString     
>    <wait about 10 seconds>
>leave do_EchoString
>
>enter do_EchoString
>    <wait about 10 seconds>
>leave do_EchoString
>
>but this isn't my want,I want result like:
>   enter do_EchoString   
>   enter do_EchoString
>        <wait about 10 seconds>
>   leave do_EchoString
>   leave do_EchoString
>
>who can tell me what should I do?
>thanks.

Hi Liu:

Normally a CORBA call will 'block' until it is done.
This is what you are seeing, the second call is not
started until the first call has returned.

If you don't want this behavior, try making the
CORBA calls "oneway", this means that they will not
block until complete, but will return immediately.

(Of course you must be very careful about using
"inout" params with oneway calls).

Hope this helps,

-Bill
------
Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]