Search code examples
androidrenderscript

Is there a callback method informing a RenderScript function or kernel is finished?


I'm thinking about using a RenderScript kernel to do some computation work and, as RenderScript execution is asynchronous, I wonder how I can be informed when the script execution is finished.

So far, I have found no answer neither in the documention nor on the internet. Is there some kind of callback method or any other mechanism to do this?


Solution

  • No, there is no callback mechanism defined by the API. The operations are async, but the only way to get the results back to Java or native code is to copy the data back, which will block until it is complete.