• Post Reply Bookmark Topic Watch Topic
  • New Topic

suspend/resume fix please help  RSS feed

 
Randall Twede
Ranch Hand
Posts: 4683
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made this applet and when I added a second thread that scrolls text, the code I was copying used suspend and resume. this works fine in IE, but causes Netscape browser to freeze. Here is my code.
 
tom Su
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public void start() {
if (runner == null) {
runner = new Thread(text);
runner.start();
}
You are not dealing with recursive topics here.. Calling a method
by itself may become an infinte-calling loop and could cause JVM to run out of control, sometimes..
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Randall
Why you want to use resume() and suspend()? They are deprecated for very good reasons.
Read here Why Are Thread.stop, Thread.suspend,
Thread.resume and Runtime.runFinalizersOnExit Deprecated?

Roseanne
 
Randall Twede
Ranch Hand
Posts: 4683
8
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont want to use suspend and resume, I want to do it another way. I suppose I could do nothing and just let the thread keep running, but that is not very nice.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!