This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Warning: Thread.suspend() was called; Navigator deadlock might result

 
Ranch Hand
Posts: 4714
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a page with some applets on it. In Netscape I get this error when I leave the page.
Warning: Thread.suspend() was called; Navigator deadlock might result
Why? Then when I close the window I get an windows warning that Netscape committed an illegal act.
OK one of the applets starts a thread that scrolls some text. I suspend that thread in stop() not the thread running the applet.
public void stop() {
if (runner.isAlive())
runner.suspend();
}
Netscape does freeze trying to load a different applet from another page about half the time.
[This message has been edited by Randall Twede (edited February 21, 2001).]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Randall,
Thread.suspend() is deprecated... something like this may work better :

This code should work fine in the majority of cases... however, if your Thread actually contains info that will be important in the Applet even if it is 'switched off', you will probably need to do something with nested loops...
HTH,
-Nate
 
Randall Twede
Ranch Hand
Posts: 4714
9
Scala Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nathan,
I think that would work ok. It was my first applet and a tutorial showed me to do it that way
I need to change the background color of the applet anyway since Netscape has a default of white(same as the page it is on). It is all jarred up and I am lazy though.
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!