On Jan 27, 9:41pm, Joshua N Pritikin wrote:
> On Sun, Jan 27, 2002 at 06:55:12PM -0500, Allen Smith wrote:
> > In regard to one_event's optional timeout parameter, I am wondering
> > whether, in the case of having both events with their own timeouts
> > (whether timer events or i/o events with timeouts or whatever) _and_
> > i/o events:
> > A. the timeout parameter servers as a maximum on how long the
> > select/poll timeout will be, even if the closest event
> > timeout is farther in the future than time()+timeout; or
> > B. if the timeout parameter only affects the select/poll
> > timeout if there are _no_ events with their own timeouts.
> > The manpage currently reads as if the latter is the case; I'm unable
> > to tell from the code, not being very good at C. If it is the latter
> > (option B) in the above, then it would be nice to be able to specify
> > an actual maximum timeout, especially to simply check "are there any
> > i/o events doable _right now_" (as in a timeout of 0).
>
> i don't really understand the question. All timeouts are treated the
> same way whether it is a timeout watcher or an i/o watcher.
In other words, if one has one_event(0), will this mean that any
poll/select call will have a timeout of 0, or is this only the case if
there are no timeouts from another source (such as a timeout watcher
or i/o watcher)?
-Allen
P.S. It would actually be nice if timeout_cb could be invoked with a
worse priority than the main cb was invoked at, BTW.
--
Allen Smith [EMAIL PROTECTED]
September 11, 2001 A Day That Shall Live In Infamy II
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin