Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Try not to forget the return value of run-timers(). Kudos to Ian F fo…

…r catching that one
  • Loading branch information...
commit 0d20c7275a8249b44ce4f3ee76e14860462188ca 1 parent fd85995
@tadzik authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/MuEvent.pm
View
4 lib/MuEvent.pm
@@ -79,8 +79,8 @@ sub clock {
sub run-once {
my $seen-action = False;
- $seen-action = run-timers();
- $seen-action = run-sockets();
+ $seen-action += run-timers();
+ $seen-action += run-sockets();
if not $seen-action {
for @idlers { $_<cb>.(|$_<params>) }
}

3 comments on commit 0d20c72

@losinggeneration

Personally I'd probably do this:
my $seen-action = run-timers() || run-sockets();

@tadzik
Owner

Not bad indeed; I was probably thinking about some future run-foo() calls.

@losinggeneration

Indeed. Four to six functions OR'd like that would probably be about the point I'd switch to a different syntax for clarity.

Please sign in to comment.
Something went wrong with that request. Please try again.