[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-java
Subject: Re: AttachCurrentThread()
From: Nathan Meyers <nmeyers () javalinux ! net>
Date: 2000-01-25 20:07:29
[Download RAW message or body]
Jeff Galyan wrote:
>
> Hi, Mark,
>
> First, you might want to check out Sheng Liang's excellent book on JNI,
> titled "The Java Native Interface". Also, Nathan Meyers' book, "Java
> Programming on Linux" is an excellent resource for Linux-specific Java
> programming questions, and (I think) includes a chapter or two covering
> JNI and Linux-specific gotchas.
You won't find anything about four-thread limits in my book :-). This
sounds pretty weird - you might try hitting Ctrl-\ in the terminal
running the JVM: this'll give you a dump you can examine for monitor
contention.
Nathan
>
> Between the two of those, you should have just about all your JNI
> questions covered! :)
>
> --Jeff
>
> Mark Delafranier wrote:
> >
> > Java Linux Buffs:
> >
> > I have a mutli-threaded application using pthreads, RedHat 6.1, gcc 2.91.66,
> > libc 2.1.2. This is a standard RedHat 6.1 install with no patches or upgrades.
> >
> > I have searched through the www.blackdown.org faqs on using JNI and I did not
> > find anything helpfull for this problem.
> >
> > I application spawns various threads to deal with client requests, like a web
> > server would spawn threads to deal with http requests. The main process
> > performs the JNI_CreateJavaVM() which succeeds.
> >
> > When a thread is started it issues an AttachCurrentThread and then proceeds with
> > its work. I am finding that this method succeeds for 4 threads and then blocks
> > for other threads.
> >
> > Its like AttachCurrentThread is hanging or blocked on mutex of some sort. The
> > same code works under Solaris and NT.
> >
> > Is there a limit to the number of threads that can be attached to the VM?
> >
> > BTW: I believe I have everything setup so that the vm properly uses
> > native_threads.
> >
> > Any suggestions?
> >
> > Thanks
> > Mark DeLaFranier.
> >
> > ----------------------------------------------------------------------
> > To UNSUBSCRIBE, email to java-linux-request@java.blackdown.org
> > with a subject of "unsubscribe". Trouble? Contact karl@blackdown.org
>
> --
> Jeff Galyan
> http://www.anamorphic.com
> http://www.sun.com
> jeffrey dot galyan at sun dot com
> talisman at anamorphic dot com
> Sun Certified Java(TM) Programmer
> ======================================================================
> Linus Torvalds on Microsoft and software development:
> "... if it's a hobby for me and a job for you, why are you doing such a
> shoddy job of it?"
>
> The views expressed herein do not necessarily reflect those of my
> employer.
>
> Sun Microsystems, Inc., has no connection to my involvement with the
> Mozilla Organization.
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to java-linux-request@java.blackdown.org
> with a subject of "unsubscribe". Trouble? Contact karl@blackdown.org
----------------------------------------------------------------------
To UNSUBSCRIBE, email to java-linux-request@java.blackdown.org
with a subject of "unsubscribe". Trouble? Contact karl@blackdown.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic