commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristian Lorenzetto <cristian.lorenze...@gmail.com>
Subject [javaflow] - how to use continuation in JNI boundary
Date Fri, 19 Jan 2018 19:26:58 GMT
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?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message