🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18181

Re: Current Thread

#18181
From: Jo�lle Dauphin
Date: Wed, 05 Aug 1998 00:00
24 lines
1097 bytes
RED MACPHERSON wrote:
> 
> Can you get a reference to your running thread from any point in an
> application? I would like to sleep(100) but I don't have access to my
> thread, or do I?

Try this:

try { Thread.currentThread().sleep(10000); }
catch(Exception e) {e.printStackTrace(); }

or create your own Thread:

Thread runner;  //create object variable in initialisation of applet

public void start() {
  if (runner == null) {
    runner = new Thread(this);
    runner.start();
}

Good luck!

Jo�lle
Technical Details
Message-ID: <35C86223.3353@videotron.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <MPG.10316000d547b109989680@forums.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,dab2837517ebda6
X-Google-Attributes: gidf74b3,public
From: Jo�lle Dauphin <joelled@videotron.ca>
Subject: Re: Current Thread
Date: 1998/08/05
Message-ID: <35C86223.3353@videotron.ca>
X-Deja-AN: 378161556
Content-Transfer-Encoding: 8bit
References: <MPG.10316000d547b109989680@forums.inprise.com>
Content-Type: text/plain; charset=iso-8859-1
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: joelled@videotron.ca
Newsgroups: borland.public.jbuilder.java.language