--- EV/EV.pm 2018/12/21 07:06:51 1.154 +++ EV/EV.pm 2019/05/12 21:58:31 1.155 @@ -250,7 +250,7 @@ Establishes the current time by querying the kernel, updating the time returned by C in the progress. This is a costly operation and -is usually done automatically within C. +is usually done automatically within C. This function is rarely useful, but when some event callback runs for a very long time without entering the event loop, updating libev's idea of @@ -315,9 +315,9 @@ =item $loop->break ([$how]) When called with no arguments or an argument of EV::BREAK_ONE, makes the -innermost call to EV::loop return. +innermost call to EV::run return. -When called with an argument of EV::BREAK_ALL, all calls to EV::loop will +When called with an argument of EV::BREAK_ALL, all calls to EV::run will return as fast as possible. When called with an argument of EV::BREAK_CANCEL, any pending break will @@ -509,21 +509,21 @@ =item $previous_state = $w->keepalive ($bool) -Normally, C will return when there are no active watchers +Normally, C will return when there are no active watchers (which is a "deadlock" because no progress can be made anymore). This is convenient because it allows you to start your watchers (and your jobs), -call C once and when it returns you know that all your jobs are +call C once and when it returns you know that all your jobs are finished (or they forgot to register some watchers for their task :). Sometimes, however, this gets in your way, for example when the module -that calls C (usually the main program) is not the same module +that calls C (usually the main program) is not the same module as a long-living watcher (for example a DNS client module written by somebody else even). Then you might want any outstanding requests to be -handled, but you would not want to keep C from returning just +handled, but you would not want to keep C from returning just because you happen to have this long-running UDP port watcher. In this case you can clear the keepalive status, which means that even -though your watcher is active, it won't keep C from returning. +though your watcher is active, it won't keep C from returning. The initial value for keepalive is true (enabled), and you can change it any time.