fixed bug where void async return didn't work

This commit is contained in:
ParkerTenBroeck 2025-05-01 19:37:11 -04:00
parent 487723713a
commit 93a764c986
2 changed files with 6 additions and 8 deletions

View file

@ -2,7 +2,6 @@ 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;
@ -14,7 +13,7 @@ public class Main implements Runnable {
@Override
public void run() {
lambda(() -> {
async_lambda(() -> {
System.out.println("START");
Delay.delay(100).await();
System.out.println("END");
@ -24,15 +23,15 @@ public class Main implements Runnable {
await();
}
void async_lambda(Supplier<Future<?, ?>> lambda){
new Jokio().blocking(lambda.get());
}
void await(){
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)");