On Fri, Jul 11, 2003, Shlomi Fish wrote about "Re: fork & exec from a threaded 
application":
> > void *thread(void* arg)
> > {
> >     while(1)
> >             sleep(1);
> 
> Am I wrong or does sleep() halts the entire process (all the threads)?

You are wrong. Sleep(1) pauses just one thread on Linux (or on any other
half-decent nearly-posix-threads-compliant system).


-- 
Nadav Har'El                        |      Friday, Jul 11 2003, 11 Tammuz 5763
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Live as if you were to die tomorrow,
http://nadav.harel.org.il           |learn as if you were to live forever.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to