Permalink
Browse files

Adjust return value of condvar's recv call to its context

  • Loading branch information...
1 parent fa7367d commit f491b737fd54068f4342c5e6361858ecd38b0a16 @am0c am0c committed Oct 30, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/MuEvent.pm
View
@@ -19,7 +19,8 @@ class MuEvent::Condvar {
method recv() {
$since = clock() unless $since.defined;
MuEvent::_poll until $.flag;
- return @.sent but True;
+ return unless @.sent;
+ return @.sent > 1 ?? @.sent !! @.sent[0];
}
}

0 comments on commit f491b73

Please sign in to comment.