| Author |
Multi Threading Concept.!!
|
Imran Mohd
Ranch Hand
Joined: Mar 02, 2009
Posts: 38
|
|
Hi
i am in to Game development, so i am using many thread in my game
i was facing many issues ,one of them is
When DVM run's out-Of-Memory than DVM is killing my running threads...!!
Does your book Cover Handling Multiple Threads in the application...?
So that i can implement Multi-Threading Concept Efficiently..
|
Cheers,
Mohd Imran (SCJP 1.5)
|
 |
Fred Grott
Ranch Hand
Joined: Oct 05, 2002
Posts: 346
|
|
have you done any profiling via using the Eclipse debug view yet as far as how many threads and how much space each thread takes?
|
MobileBytes blog - Sharing Technology - My Programming Knols
|
 |
Ed Burnette
Author
Ranch Hand
Joined: Jun 10, 2003
Posts: 142
|
|
There's a little on threading in the communications chapter (doing network I/O on a different thread). I recommend Brian Goetz's book, Java Concurrency in Practice, for a deep dive on threading. I have a signed copy, and you can't have it.
IMHO threads are over-used. I'm guilty of doing this too. As a rule of thumb there should be one, maybe two threads per CPU core. If you have more than that you're just inviting problems with contention, switching overhead, and memory.
I'm not aware of any feature in Android that will kill certain threads but leave others running. Check your exception handling carefully and use the Log.d() and Log.e() functions to see what's going on, and simplify the program to eliminate unnecessary threads.
|
Ed Burnette, Author of Hello Android
Blog: ZDNet's Dev Connection - Twitter: @eburnette
|
 |
 |
|
|
subject: Multi Threading Concept.!!
|
|
|