Skip to content

Instantly share code, notes, and snippets.

@sng2c
Created June 21, 2012 07:53
Show Gist options
  • Save sng2c/2964457 to your computer and use it in GitHub Desktop.
Save sng2c/2964457 to your computer and use it in GitHub Desktop.
AnyEvent recursive blocking wait error
use AnyEvent;
my $cv = AE::cv;
my $t = AE::timer 2,0, sub{
my $cv2 = AE::cv;
my $cnt = 10;
my $tot = 0;
foreach(1..10){
my $idx = $_;
my $tt; $tt = AE::timer 1,0,sub{
print "$idx\n";
$tot+=$idx;
$cnt--;
$cv2->send unless $cnt;
}
}
$cv2->recv;
print "tot: $tot\n";
};
$cv->recv;
print "DONE\n";
# EV: error in callback (ignoring): AnyEvent::CondVar: recursive blocking wait attempted at ev.pl line 19
@khan5v
Copy link

khan5v commented Feb 7, 2017

I had this error today, can you elaborate a bit more on what's happening there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment