Blocked Threads with JNI loop

Clemens Kühnle clemens.kuehnle at
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?


Patrick Tullmann <tullmann at> 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
>   If Gates got a dime each time Windows crashed... Oh, nevermind... 1

1.000.000 DM gewinnen - kostenlos tippen -
IhrName at, 8MB Speicher, Verschluesselung -

More information about the kaffe mailing list