Coro iconCoro 4.73

Coro is a large Perl module family that implements cooperative multitasking in Perl.
Coro is a large Perl module family that implements cooperative multitasking in Perl. It supports filehandle and event abstraction and also implements continuations as well as the necessary directives to implement a slightly limited call/cc in Perl.

Unlike the so-called "Perl threads/fork emulation", they provide a real shared address space (like real threads) without the associated race conditions and performance loss, while maintaining a very low memory overhead (2-3kb/coroutine). The package comes with examples and many supporting modules.

SYNOPSIS

use Coro;

async {
# some asynchronous thread of execution
print "2n";
cede; # yield back to main
print "4n";
};
print "1n";
cede; # yield to coroutine
print "3n";
cede; # and again

# use locking
my $lock = new Coro::Semaphore;
my $locked;

$lock->down;
$locked = 1;
$lock->up;

last updated on:
May 29th, 2008, 19:18 GMT
price:
FREE!
developed by:
Marc Lehmann
license type:
Perl Artistic License 
category:
ROOT \ Programming \ Debuggers

FREE!

In a hurry? Add it to your Download Basket!

user rating 28

UNRATED
3.2/5
 

0/5

Add your review!

SUBMIT