home *** CD-ROM | disk | FTP | other *** search
- package netscape.netcast;
-
- import marimba.castanet.client.CastanetConstants;
- import marimba.castanet.client.CastanetWorkspace;
-
- class ThreadGroupStopper implements Runnable, CastanetConstants {
- ApplicationThreadGroup group;
-
- ThreadGroupStopper(CastanetWorkspace ws, ApplicationThreadGroup group) {
- this.group = group;
- ws.addLocalTask(this, "Destroy-" + ((ThreadGroup)group).getName(), 8);
- }
-
- public void run() {
- try {
- for(int i = 0; i < 3; ++i) {
- this.group.close();
-
- try {
- Thread.sleep(250L);
- } catch (InterruptedException var7) {
- }
-
- try {
- this.group.destroy();
- break;
- }
- }
- } finally {
- this.group = null;
- Runtime.getRuntime().gc();
- }
-
- }
- }
-