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

io.github.vipcxj.jasync.ng.spec.JThunk 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;

public interface JThunk {

    void resolve(T result, JContext context);
    void reject(Throwable error, JContext context);
    default void interrupt(InterruptedException error, JContext context) {
        reject(error != null ? error : new InterruptedException(), context);
    }
    default void interrupt(JContext context) {
        interrupt(new InterruptedException(), context);
    }
    void onRequestCancel(Runnable runnable);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy