mirror of
https://github.com/ParkerTenBroeck/coroutines.git
synced 2026-06-07 05:08:51 -04:00
testing
This commit is contained in:
parent
24ea55603e
commit
487723713a
2 changed files with 15 additions and 2 deletions
|
|
@ -1,9 +1,12 @@
|
|||
import async_runtime.Delay;
|
||||
import async_runtime.Jokio;
|
||||
import generators.RT;
|
||||
import future.Future;
|
||||
import future.Waker;
|
||||
import gen.Gen;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class Main implements Runnable {
|
||||
public static void main(String[] args) {
|
||||
RT.runWithGeneratorSupport(Main.class);
|
||||
|
|
@ -11,8 +14,14 @@ public class Main implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
// await();
|
||||
lambda(() -> {
|
||||
System.out.println("START");
|
||||
Delay.delay(100).await();
|
||||
System.out.println("END");
|
||||
return Future.ret();
|
||||
});
|
||||
lexer();
|
||||
await();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -20,6 +29,10 @@ public class Main implements Runnable {
|
|||
new Jokio().blocking(AsyncExamples.test());
|
||||
}
|
||||
|
||||
void lambda(Supplier<Future<?, ?>> lambda){
|
||||
new Jokio().blocking(lambda.get());
|
||||
}
|
||||
|
||||
|
||||
void lexer(){
|
||||
var gen = Lexer.parse("f7(x,y,z,w, u,v, othersIg) = v-(x*y+y+ln(z)^2*sin(z*pi/2))/(w*u)+sqrt(othersIg*120e-1)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue