Hello every one, it's my first mail in the mail group.
Be glad to see kno u all.

------------
I'm designing a program, using multi-threads in C
under Red hat Linux 9.0. The basic structure of my
design is like this:
+++++++++++++++++++++++++++++++++++++
                 main_thread
         (net)          
 client  -----   thread1

 client  -----   thread2

 client  -----   thread3
++++++++++++++++++++++++++++++++++++

 threadn is created by main_thread. When  there comes
a new connection from the client, the main thread
creat a new serving thread for it. That's it. 

The question is:

How can I time for a thread? I need a way for timing
to deal with the case that the client sends nothing
for some time(30 seconds for example).

I kno the function sleep(), or other signal function
works well for signal thread program. But what about
multi-thread program? If alarm() wakes up all the
threads, or just a single one? And how do u deal with
this problem?


That's all.  Any reply will be appreciated. Thanks.



                                   aning



_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
--
______________________________________________________________________
Pune GNU/Linux Users Group Mailing List:      (plug-mail@plug.org.in)
List Information:  http://plug.org.in/mailing-list/listinfo/plug-mail
Send 'help' to [EMAIL PROTECTED] for mailing instructions.

Reply via email to