how can I stop a thread from sleeping?
From: mimisam (michikotas_at_yahoo.com)
Date: 10/31/03
- Next message: Christophe Vanfleteren: "Re: how can I stop a thread from sleeping?"
- Previous message: Dave Bell: "Re: migrating to AMD Athlon64"
- Next in thread: Christophe Vanfleteren: "Re: how can I stop a thread from sleeping?"
- Reply: Christophe Vanfleteren: "Re: how can I stop a thread from sleeping?"
- Reply: Qscar_P=E9rez_del_Campo?=: "Re: how can I stop a thread from sleeping?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Oct 2003 01:16:54 -0800
hi,
I have a program(like the following codes) which needs to sleep for 20
seconds. How can i make it stop sleeping if i want it to be alive
before 20 seconds is up?(e.g. when a cancel button is clicked).
Any help will be appreciated !!
Thanks.
public static void a()
{
delay(20000);
}
public static void delay(int d)
{
try {
Thread.sleep(d);
} catch (InterruptedException e) {}
}
- Next message: Christophe Vanfleteren: "Re: how can I stop a thread from sleeping?"
- Previous message: Dave Bell: "Re: migrating to AMD Athlon64"
- Next in thread: Christophe Vanfleteren: "Re: how can I stop a thread from sleeping?"
- Reply: Christophe Vanfleteren: "Re: how can I stop a thread from sleeping?"
- Reply: Qscar_P=E9rez_del_Campo?=: "Re: how can I stop a thread from sleeping?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]