Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Thread.stop() deprecation


  • From: salomeharrison@xxxxxxxxx (Salome Harrison)
  • Subject: Thread.stop() deprecation
  • Date: Mon, 28 Feb 2000 12:18:26 -0800 (PST)

Hi all,

I am trying to modify someone's existing code to take
care of the Thread.stop deprecation.  I am having
trouble getting it to work.  I get a compilation error
saying that stopRequested is undefined in the second
class (OtherClass).  Here is the structure:

public class MyClass extends Frame implements
ActionListener {

 private boolean stopRequested;

 public void doIt() {
  ...
  Thread threadList = new Thread((OtherClass)panList);
  threadList.start();
  ...
  stopRequested = true;  //want the thread to stop
 }
}
class OtherClass extends Panel impplements Runnable,
ActionListener {

 public void run() {
  while(!stopRequested) {
   ...
  }
 }
}

Please help!

-Salome
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx