If you don't like it, use your own Thread or the slightly higher-level
HandlerThread and implement the semantics you want.

On Fri, Aug 7, 2009 at 10:50 AM, Jason Proctor <
[email protected]> wrote:

>
> i'm fine with the single running instance model. not so much the
> totally unreusable model, which is the one followed by AsyncTask.
>
> java.util.Timer is the same way, but that's no excuse for imitation ;-)
>
>
> >  there is a difference in "can be used only once" and  "single
> >running instance is allowed"
> >
> >The correct is only single running instance is allowed. Once can get
> >the status through getStatus and can take action accordingly e.g.
> >cancel
> >
> >
> >if (YourasynchSubClass.getStatus() == AsyncTask.Status.RUNNING)
> >                 YourasynchSubClass.cancel(true);
> >
> >YourasynchSubClass.execute(parms);
> >
> >
>
>
>
>
> --
> jason.software.particle
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to