Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
The only fake threads in Perl 6
Perl6
tree: 762489b957

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
t
LICENSE
META.info
README

README

Holy raptors, look at this code!

    use Coroutines;
    
    async {
        # some asynchronous thread of execution
        say 2;
        yield; # yield back to main
        say 4;
    };
    
    say 1;
    schedule; # jump to async block
    say 3;
    schedule; # and again
    say 5;
    schedule; # this would do nothing, all coroutines are exhausted
    say 6;

This will print 1, 2, 3, 4, 5, 6! In the correct order!
Awesome!
Order NOW for 1.99zł!
Something went wrong with that request. Please try again.