Subject: | Async Listen |
Date: | Wed, 7 May 2014 15:03:47 +0200 |
To: | bug-AnyEvent-Pg [...] rt.cpan.org |
From: | Rolf Schaufelberger <rs [...] plusw.de> |
Hello,
I’ve just done a test with AnyEvent-Pg, yet I’m not sure if this is a bug or if just misunderstand the function.
I took the code from example.pl and modified the on-notify callback from
sub { say "foo!“ });
to
sub { say "foo!", $_[3]; sleep 5; say 'Finished',$_[3] });
and the I sent 3 Notify immediately after each other:
ip=# notify foo ,'123';
NOTIFY
ip=# notify foo ,'124';
NOTIFY
ip=# notify foo ,'125'
The result I got was :
foo!123
Finished123
foo!124
Finished124
foo!125
Finished125
So where is the async -feature? What I expected was
foo!123
foo!124
foo!125
Finished123
Finished124
Finished125
Did I understand that wrong ?
Regards
Rolf Schaufelberger