Blocked Threads with JNI loop

Clemens Kühnle clemens.kuehnle at web.de
Thu Jul 20 12:08:06 PDT 2000


Thank you very much for the anwser,

I tried it with the Call to Thread.sleep(). Blocking ends!
But there is a Call to a select() statement which is blocking for
1 secound. In this time the other threads are blocked again.
I can change the time that select waits for, but I don't know if this
is the right way, perhaps i'll ask rxtx.

But where is the difference to the sun jvm, is it the threading system?
Or the JNI Implementation?

Clemens







Patrick Tullmann <tullmann at cs.utah.edu> schrieb am 19.07.00:
> > I changed the c-function for simplicity to while(1){sleep(10000);break;}
> 
> You need to call a version of sleep() that Kaffe's threading system
> will know about.  (You're putting the whole process to sleep, not just
> one thread.)
> 
> I don't know what the correct JNI call is, but in Kaffe you could call
> 'jthread_sleep()'....  Perhaps the right thing is to, invoke the
> Thread.sleep() method on the current Thread.  (You should be able to
> do that via standard JNI static method invocation.)
> 
> BTW, in looking through the source, I noticed that Kaffe no longer
> uses jthread_sleep() for anything.  (Thread.sleep() is implemented as
> a timeout on a condition variable wait.)
> 
> -Pat
> 
> ----- ----- ---- ---  ---  --   -    -      -         -               -
> Pat Tullmann                                       tullmann at cs.utah.edu
>   If Gates got a dime each time Windows crashed... Oh, nevermind... 1


_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
IhrName at web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de



More information about the kaffe mailing list