If the thread is sleep()-ing or wait()-ing, call notify() to wake it up.
-- Kostya
07.03.2011 8:39, Krishna Shetty ?:
When I set "*yourThread.instanceBooleanAttribute = false;*" , the
Thread may be sleeping. How to destroy a sleeping thread?
thanks,Krishna
--
You received this message bec
When I set "*yourThread.instanceBooleanAttribute = false;*" , the Thread may
be sleeping. How to destroy a sleeping thread?
thanks,Krishna
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-develo
Hi Brijesh,
You have a *while(true){...}*, haven't you?
Change it to:
*while(instanceBooleanAttribute){...}*
Now, you can stop the Thread process from another Class, simply
calling "*yourThread.instanceBooleanAttribute
= false;*".
Roc Boronat from Barcelona
http://piposerver.com
--
You recei
sage-
> From: android-developers@googlegroups.com [mailto:android-
> develop...@googlegroups.com] On Behalf Of brijesh
> Sent: Thursday, June 17, 2010 3:40 AM
> To: Android Developers
> Subject: [android-developers] Thread Problem
>
> Hello,
>
> I want to sto
In your thread you probably have something like:
public void run () {
while (true) {
doSomeWork();
}
}
what you need is a boolean var that checks whether to continue 'doing work',
or stop the thread. Like this:
public void run () {
while (!stopThread) {
doSomeWork();
Hello,
I want to stop currently running thread but -Thread.stop() -
Thread.destroy() are DEPRECATED so can any one tell me how to stop the
Thread
--
Regards,
Brijesh Masrani
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to th
Hi,
i use a Thread to make buttons visible for some seconds. If the
location change, the buttons should gets visible for x seconds.
My code:
dialog = new Thread (new Runnable()
{
public void run()
{
try
{
Thread.sleep(3000);
7 matches
Mail list logo