3 messages in net.java.dev.jna.usersRe: [jna-users] threads and JNA
FromSent OnAttachments
Glick, Gene (GE Indust, Security)Oct 29, 2007 11:29 am 
Timothy WallOct 29, 2007 12:45 pm 
Glick, Gene (GE Indust, Security)Oct 29, 2007 1:39 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] threads and JNAActions...
From:Timothy Wall (twal@dev.java.net)
Date:Oct 29, 2007 12:45:31 pm
List:net.java.dev.jna.users

On Oct 29, 2007, at 2:29 PM, Glick, Gene (GE Indust, Security) wrote:

Although I previously asked a question regarding threads, this is slightly different:

If a java app has multiple threads running, and then JNA dispatches a call to a native method in some .dll, do the java threads stall while the JNA call is running? In other words, does the JNA call hog the CPU?

JNA calls shouldn't affect thread scheduling any more than any other JNI call. It *will* lock memory on primitive array arguments in some circumstances, but I don't think that's your issue.

Note that if your native function hogs the CPU, your other threads may not get much time to run, but that's not JNA's fault.