ViewVC Help
View File
|
Revision Log
|
Show Annotations
|
Download File
/
cvs
/
AnyEvent-MP
/
eg
/
simple_example
Revision:
1.1
Committed:
Fri Aug 28 14:43:53 2009 UTC
(14 years, 9 months ago) by
elmex
Branch:
MAIN
Log Message:
more work on the intro.
File Contents
#
Content
1
#!/opt/perl/bin/perl
2
use AnyEvent;
3
use AnyEvent::MP;
4
5
my $end_cv = AnyEvent->condvar;
6
7
my $port = port;
8
9
rcv $port, test => sub {
10
my ($data) = @_;
11
$end_cv->send ($data);
12
};
13
14
snd $port, test => 123;
15
16
print "Ending with: " . $end_cv->recv . "\n";