generate/yield doesn't look like the best choice here for me. more like async/await kind of situation, or even a custom coroutine. haven't worked much with jni/jna but it seems like a good solution would be to have a coroutine start a task and then stop until a method is called that would provide it with data. That is, of course, if returning regular
Future<SomeNativeInfo>
is not an option