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.

wen liu



从网站得到更多信息。MSN Explorer 免费下载:http://explorer.msn.com/lccn



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