Re: Timeout questions
[email protected] Fri, 24 Dec 2004 09:25:33 +0000
| Newsgroups | gmane.comp.lib.state-threads.user |
|---|---|
| Message-ID | <122420040925.20190.41CBE08D000D645700004EDE2207002953089C0A020A09@comcast.net> |
> 1. In the reference, st_netfd_poll() section: > > "If the value of timeout is -1, this function blocks > until a requested I/O event occurs or until the call > is interrupted by st_thread_interrupt()". > > Is this true for other functions, say, st_accept(), > st_read(), etc.? Yes, -1 means infinite timeout for all I/O functions taking timeout argument. > 2. Is there any reason why ST_UTIME_NO_TIMEOUT is not > in st.h (public.h)? I guess the main reason is that "-1" is much shorter than "ST_UTIME_NO_TIMEOUT" :) According to I/O function prototypes in st.h, timeout value -1 will be treated as (st_utime_t)-1 or -1ULL which is exactly the same as ST_UTIME_NO_TIMEOUT. --Gene ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/