JNI and CPU Load Problem

  • Thread starter nassim.bouayad-agha
  • Start date
N

nassim.bouayad-agha

Hi!
I have a big problem with JNI.If I call a native function that contains
a loop, the CPU usage reaches 100%. I tryed the native function from a
native application,and the CPU usage is normal...I found a way to fix
that(By using native call and then callback from native environement
for notification) but I want the Java to be blocked until the function
returns.
I am using a multithreaded DLL.
Any idea?
Thank you in advance.
Nassim.
 
W

wee

You could use a Java COM bridge via which you could accept events from
a COM object (native app). Then the java app could call the COM object
and wait until it receives a fired event before it continues.

Beware, some of the bridges out there do not allow event handling, such
as Jacob (as of 2003). On the other hand, jacoZoom is a great bridge.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top