Trying to catch InterruptedException!_NEWLINE_!from within native code
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Carlos_Rodriguez
Posted On:   Wednesday, July 18, 2001 04:30 PM

Hi:

I have a JNI DLL that does some fairly intensive image processing. I want to be able to, from within the C code, catch InterruptedException should the main thread call interrupt() on the thread that wraps my native code. This is so that I can release memory and do general cleanup. My main problem is that, from the java side, this call to interrupt could come at ANY type as a response to an event. In other words, if someone where to call interrupt(), how could my C code detect that?

Re: Trying to catch InterruptedException!_NEWLINE_!from within native code

Posted By:   Dermot_Hennessy  
Posted On:   Thursday, July 19, 2001 01:52 AM

Could you have your Java code catch the Exception and send a signal to your C process which could be trapped and dealt with in an appropriate manner?

Dermot
About | Sitemap | Contact