Hi

I have a similar scenario

public static final class MyCoroutine implements Runnable {

     Continuation c;
     MyCoroutine(){
       c=Continuation.startWith(this);
     }

    @Override
    public void run() {
       native_func(c, new NativeCallback(){  // inside JNI native_func
Continuation.suspend(); is executed before to call callback.

     public static void callback(){
           Continuation.continueWith(MyCoroutine.this);

    }


   });
}

}

could it work?

I might find a way for calling a native method making a stuff and when is
completed, it calls  a callback( NativeCallback) reactiving the coroutine.

Is there a way for doing it?

Reply via email to