async_ex fxd: no need do_smth/noop

master
Kolan Sh 2018-08-20 19:10:53 +03:00
parent 289eb9ff5d
commit 9ed5df9242
1 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,10 @@
async void do_smth () {}
async void async_method(int idx, int max, int step, MainLoopKeeper mlk) {
for(var i = 0; i < max; ++i) {
stdout.puts(@"Async$idx:$i\n");
for(var j = 0; j < step; ++j) yield do_smth();
for(var j = 0; j < step; ++j) {
Idle.add(async_method.callback);
yield;
}
}
}