Hello there,
I have a problem and I don't know if the JNA API can help or not.
Basically what I would like to do, is to set a timeout on a method call.
In fact I have my library declaring some methods stored in the loaded
DLL, and all is working just fine.
But one method I'm calling can last up to many seconds. The problem is
that I don't want this method to get stuck for a long time, stopping
the execution of the rest of the java program.
I tried to make the call in a separate Thread but since it's only one
method call (one line of code) and not a loop that will be executed
many times, I can't really stop the Thread when the run method exceed
the time I've fixed.
Notice that I can't touch to the DLL source code, it's not mine.
I searched through the JNA API but I did not find what i'm searching
for (if there is).
If anybody can help me, it would be very nice :-).
Thanks in advance !