Re: Event and IO::Socket
[email protected] (Joshua N Pritikin) Tue, 6 Aug 2002 10:25:32 +0530
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 05, 2002 at 03:08:35PM -0400, Jeff Boes wrote: > On Mon, 2002-08-05 at 14:11, Joshua N Pritikin wrote: > > > But on another note: what exactly does the 'min' parameter for an 'io' > > > event do? > > > > 'min' is the minimum number of seconds between triggering the watcher. > > If it triggers more frequently than 'min' seconds that that is fine. > > Whuh? How is that different than the 'max' behavior, then? OK, i was confused. The best way to settle this is to point you to the man page: =item io Extra attributes: fd => $fd, poll => 'rwe' [timeout => $seconds, hard => $bool, timeout_cb => \&code] =item idle Extra attributes: min => $seconds, max => $seconds The callback is invoked only when no events are pending. If there is never a chance to idle, an event will be generated at least every C<max> seconds and not more often than C<min> seconds. +++ From re-reading, it looks like an io timeout is not really the same as an idle min or max. Each has unique behaviour. -- Victory to the Divine Mother!! after all, http://sahajayoga.org http://why-compete.org