Created
April 26, 2012 21:14
-
-
Save niner/2503294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sub main :main | |
.local pmc task, sayer, dummy | |
sayer = get_global 'sayer' | |
dummy = new ['Integer'] | |
task = new ['Task'] | |
setattribute task, 'code', sayer | |
setattribute task, 'data', dummy | |
schedule task | |
wait task | |
.end | |
.sub sayer | |
.param pmc proxy | |
.local pmc interp, task, result_sub, result_task, dummy | |
interp = getinterp | |
dummy = new ['Integer'] | |
result_sub = get_global 'result_sub' | |
again: | |
result_task = new ['Task'] | |
setattribute result_task, 'code', result_sub | |
setattribute result_task, 'data', dummy | |
interp.'schedule_proxied'(result_task, proxy) | |
result_task = new ['Task'] | |
setattribute result_task, 'code', result_sub | |
interp.'schedule_proxied'(result_task, proxy) | |
goto again | |
.end | |
.sub result_sub | |
.param pmc dummy | |
.local pmc dummy2 | |
.end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment