0

I am using the class RemoteCallbackList in Android, but when I am calling the callback in the remote process, the callback hangs, and then so do my calling thread. Now, is it possible to "kill" the callback and free my process (from another thread in my process), i.e. can I force a RemoteException to happen in my process to disconnect the callback so I can proceed?

JohnyTex
  • 3,323
  • 5
  • 29
  • 52
  • What type of "callback hangs" so you encounter? Waiting endless for something, endless loop? The best way would be to change the remote process code to make it more robust. – Robert Aug 21 '23 at 07:05
  • The remote process dies due to wasting memory, and we need to be resilient against flawed applications either way. – JohnyTex Aug 21 '23 at 07:08
  • Assuming you have a thread in your local application that waits for the callback the correct way to handle this situation would be execute `Thread.interrupt()` for the waiting thread. – Robert Aug 21 '23 at 07:39
  • It is in a remote external application/process though, however. – JohnyTex Aug 21 '23 at 08:17

0 Answers0