mm.. no.  I only have 2 or 3 threads.  Maybe that's the problem.

I always hate it when people say this.. but.. maybe you should
consider whether having 100+ threads is really appropriate for a
mobile device?

Actually even outside mobile devices, I have worked on some very large
scale, high-transaction systems and even in these systems you tend to
get very little improvement in throughput over around 10-20 threads.
At some point you'll hit a limit either in CPU, RAM, Disk IO etc etc
whereby more threads won't help and will actually slow things down.

Of course I don't know much about your use case, but I've seen very
few valid uses for that many threads in the one app, on the one
device.. mobile or otherwise.

Having said that I don't know of any pre-defined hard limit, but it
would not be surprising at all if this did in-fact exist in Android.

On Sep 24, 1:06 am, kypriakos <[email protected]> wrote:
> Hey Jason,
>
> it's running in the foreground - that's why this was a bit troubling.
> Do you have a large number of threads running in your case (100+)?
>
> Thanks
>
> On Sep 22, 1:59 pm, Jason <[email protected]> wrote:
>
>
>
> > Is your app running in the foreground during all of this?  I have
> > threads running continuously without any issues.
>
> > If your app is NOT running in the foreground then it may well be
> > suspended by the platform.  As a "general" rule the onPause method of
> > an Activity should also gracefully pause your threads.
>
> > If you need to be running continuously in the background then you
> > probably need a Service:
>
> >http://developer.android.com/reference/android/app/Service.html
>
> > On Sep 23, 12:34 am, kypriakos <[email protected]> wrote:> Hi all,
>
> > > Are there any limits on the number of threads or any constraints
> > > on how the emulator (under Eclipse) schedules the application
> > > threads? I get suspended threads that don't really wait on anything
> > > but rather get bumped out from execution time ... I will try using the
> > > Debug class to get some statistics on the thread alloc etc. even
> > > though
> > > the DDMS does that already.
>
> > > One example is, I have a simple class that simply prints a '.' every
> > > 3 seconds - well, the LogCat shows the emulator collecting garbage
> > > objects but the thread is suspended and does not print the '.' ... I
> > > may
> > > be missing something simple here
>
> > > Thanks

-- 
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