All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.vipcxj.jasync.ng.spec.functional.Functions Maven / Gradle / Ivy

Go to download

JAsync implements Async-Await fashion for Java just like es and c#. This library provide the spec of all public api.

There is a newer version: 1.0.17
Show newest version
package io.github.vipcxj.jasync.ng.spec.functional;

import io.github.vipcxj.jasync.ng.spec.JContext;
import io.github.vipcxj.jasync.ng.spec.JScheduler;
import io.github.vipcxj.jasync.ng.spec.JThunk;

import java.util.function.BiConsumer;

public class Functions {
    public static BiConsumer, JContext> PROMISE_HANDLER_EXTRACT_CONTEXT = (thunk, context) -> thunk.resolve(context, context);
    public static BiConsumer, JContext> PROMISE_HANDLER_EXTRACT_SCHEDULER = (thunk, context) -> {
        thunk.resolve(context.getScheduler(), context);
    };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy