Permalink
Browse files

Remove leftover file

  • Loading branch information...
1 parent 5521efc commit 5a8d4214b1aa28cd12b8c12d6fd0d158a85fc6e3 @tadzik committed Dec 13, 2012
Showing with 0 additions and 37 deletions.
  1. +0 −37 lib/Coro.pm
View
@@ -1,37 +0,0 @@
-module Coroutines;
-
-my @coroutines;
-
-my class Coro::still_going {};
-my class Coro::done {};
-
-my $*MAINLINE = True;
-
-sub async(&coroutine) is export {
- @coroutines.push($(gather {
- my $*MAINLINE = False;
- &coroutine();
- take Coro::done;
- }));
-}
-
-sub pass is export {
- if $*MAINLINE {
- sched;
- } else {
- yield;
- }
-}
-
-sub yield is export {
- take Coro::still_going;
-}
-
-sub sched is export {
- return unless +@coroutines;
- my $r = @coroutines.shift;
- my $result = $r.shift;
- if $result ~~ Coro::still_going {
- @coroutines.push($r);
- }
-}

0 comments on commit 5a8d421

Please sign in to comment.