Oh, and yes you could use Thread with a run() method. Its easy to set
up. AsyncTask is sort of a specialization of Thread tat helps with
some of the communication between parent and child thread. But they
can be run only once. So a new one needs to be instantiated each time.

On Nov 12, 8:13 am, Neilz <neilhorn...@googlemail.com> wrote:
> Anyone? This is a common consideration, I would have thought?
>
> On Nov 11, 10:17 pm, Neilz <neilhorn...@googlemail.com> wrote:
>
> > Hi all. I've been reading the developer guide, the sections on
> > designing for performance and responsiveness. It's great stuff, and
> > I'm going to go through all my code and refactor everything I can to
> > meet these suggestions.
>
> > One line stood out for me: "For games specifically, do calculations
> > for moves in a child thread."
>
> > Could someone possibly elaborate on this a little? If you had a game
> > where the screen was being refreshed continuously, with calculations
> > being made on every refresh, does this mean starting and ending a
> > thread every time this happens? Or is one thread created at the start,
> > which stays open for the duration of the game?
>
> > And would this be an inner class extending Thread with a run() method
> > as usual, or are there better ways of handling it? I recently used an
> > "AsyncTask" to handle a background task, would that be something that
> > could be of use here?
>
> > Many thanks for any help.

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

Reply via email to