mirror of
https://github.com/ParkerTenBroeck/coroutines.git
synced 2026-06-07 05:08:51 -04:00
fixed array issues, started adding library features for async
This commit is contained in:
parent
f99beb721b
commit
10346c3226
5 changed files with 114 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import async_runtime.Delay;
|
||||
import async_runtime.Jokio;
|
||||
import async_runtime.Util;
|
||||
import generators.RT;
|
||||
import future.Future;
|
||||
import gen.Gen;
|
||||
|
|
@ -19,6 +20,15 @@ public class Main implements Runnable {
|
|||
System.out.println("END");
|
||||
return Future.ret();
|
||||
});
|
||||
async_lambda(() -> {
|
||||
var start = System.currentTimeMillis();
|
||||
while(true){
|
||||
Util.first(Delay.delay(500), Delay.delay(1000)).await();
|
||||
var end = System.currentTimeMillis();
|
||||
System.out.println(end-start);
|
||||
start = end;
|
||||
}
|
||||
});
|
||||
lexer();
|
||||
await();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue