Skip to content

Instantly share code, notes, and snippets.

@jmblog
Created December 14, 2009 08:50
Show Gist options
  • Save jmblog/255912 to your computer and use it in GitHub Desktop.
Save jmblog/255912 to your computer and use it in GitHub Desktop.
超シンプルなCoroのサンプル
use Coro;
### To create a thread, use the async function
async {
print "async 1\n";
cede;
print "async 2\n";
};
print "main 1\n";
cede;
print "main 2\n";
cede;
=cmnt
main 1
async 1
main 2
async 2
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment