commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristian Lorenzetto <>
Subject Re: [javaflow] - how to use continuation in JNI boundary
Date Sat, 20 Jan 2018 17:38:33 GMT
What i think to understand is :

Coroutine can be suspended in a block like run() {

because the stack when is suspended is out from native func.
instead if i call suspend inside a JNI c++ class the stack is not visible
from java so probably javaflow dont work.

I have another different question:

stream is synchonized internally waiting until data is not empty.

My question is: normally in synchonized blocks the thread is blocked until
notify but inside a coroutine the class is instrumented for not blocking
the thread but just for suspending the coroutine until notify?

2018-01-20 18:12 GMT+01:00 Torsten Curdt <>:

> Hey Cristian,
> you have to think of javaflow continuations of having multiple ways of
> running through the "run" function with different entry and exit points.
> What should/will work is:
>   run() {
>     native_func();
>     Continuation.suspend();
>     native_func();
>     Continuation.suspend();
>   }
> I am not quite sure what you are trying to do with your setup. Why
> callbacks in a continuation world?
> Keep in mind that the native code is not instrumented.
> cheers,
> Torsten

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