AlbertFG
AlbertFG

Reputation: 157

In Android, one activity can have how many threads?

I'm new to Android, I know how to create an Activity and a thread. My question is how many threads can be held in one Activity?

Upvotes: 1

Views: 176

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006654

My question is how many threads can be held in one Activity?

"Can" be held? Your practical limit will be heap space. Depending on your chosen stack size for the threads, there could be thousands.

However, having that many threads would be rather bizarre. A typical sizing algorithm for a program is two times the number of cores plus one (2*N+1, where N is the number of cores).

Upvotes: 4

Related Questions