[2942] in java-interest

home help back first fref pref prev next nref lref last post

Thread in Beta .... again

daemon@ATHENA.MIT.EDU (Edith Au)
Sat Oct 21 06:33:32 1995

To: java-interest@java.sun.com
Date: Thu, 19 Oct 1995 00:08:01 -0400 (EDT)
From: Edith Au <edith@pencom.com>

Hi,
  I have posted this message 2 days ago but  received no response.  Can
someone please help?

=============================================
  
  In Animator.java (beta demo) run() method

Thread me = Thread.currentThread();
....
.....

//engine is a thread started in start() method

while (maxWidth > 0 && maxHeight > 0 && engine == me)
{....}


  What is the role of thread me?  Why does it need to compare
engine and me?

  If I have another applets running on the same page, will
Thread.currentThread() = thread from another applet since only 1
thread is "physically" running at a time ? If it is true,
then the Blink applet might cause problem on a page with 2 or
more applets

public void run()
{
  while (true)
    try { Thread.currentThread().sleep(speed);}
        .......

}

It might put the wrong thread to sleep!

Can someone help?

Cheers,
Edith


-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post