[android-developers] Re: Child Thread Blocking Problems

2010-11-10 Thread Hank
I managed to fix it, apparently I was not associating the handler and looper to the child thread On Oct 28, 5:22 pm, DanH danhi...@ieee.org wrote: Assuming that post() or postDelayed() starts the Thread is even more popular. On Oct 28, 4:47 pm, fadden fad...@android.com wrote: On Oct 28,

Re: [android-developers] Re: Child Thread Blocking Problems

2010-11-10 Thread Paa-kofi Amissah
good thing hank On Wed, Nov 10, 2010 at 7:41 PM, Hank hwang...@gmail.com wrote: I managed to fix it, apparently I was not associating the handler and looper to the child thread On Oct 28, 5:22 pm, DanH danhi...@ieee.org wrote: Assuming that post() or postDelayed() starts the Thread is even

[android-developers] Re: Child Thread Blocking Problems

2010-10-28 Thread DanH
The problem is that you should never wait or block in the main thread. Your background thread needs to somehow notify the main thread that the connection is ready, and until then the main thread should be spinning (in the figurative sense) in its event loop, not sitting on a wait. On Oct 28,

[android-developers] Re: Child Thread Blocking Problems

2010-10-28 Thread Hank
In my code, I don't have wait or block in the main thread, but in the child thread. So supposedly only the child thread should wait or block. On Oct 28, 2:37 pm, DanH danhi...@ieee.org wrote: The problem is that you should never wait or block in the main thread.  Your background thread needs to

Re: [android-developers] Re: Child Thread Blocking Problems

2010-10-28 Thread TreKing
On Thu, Oct 28, 2010 at 1:42 PM, Hank hwang...@gmail.com wrote: In my code, I don't have wait or block in the main thread, but in the child thread. So supposedly only the child thread should wait or block. Post the code you're using, or we're just going to be guessing.

[android-developers] Re: Child Thread Blocking Problems

2010-10-28 Thread DanH
Lemme guess: You created a Thread but you never started it. On Oct 28, 1:42 pm, Hank hwang...@gmail.com wrote: In my code, I don't have wait or block in the main thread, but in the child thread. So supposedly only the child thread should wait or block. On Oct 28, 2:37 pm, DanH

Re: [android-developers] Re: Child Thread Blocking Problems

2010-10-28 Thread Kostya Vasilyev
Another guess - start() immediately followed by join(). -- Kostya 28.10.2010 23:35, DanH пишет: Lemme guess: You created a Thread but you never started it. On Oct 28, 1:42 pm, Hankhwang...@gmail.com wrote: In my code, I don't have wait or block in the main thread, but in the child thread.

[android-developers] Re: Child Thread Blocking Problems

2010-10-28 Thread fadden
On Oct 28, 12:35 pm, DanH danhi...@ieee.org wrote: Lemme guess:  You created a Thread but you never started it. Calling run() instead of start() is tremendously popular. :-) It also causes a memory leak, because Threads get added to ThreadGroup when they're created and don't get removed until

[android-developers] Re: Child Thread Blocking Problems

2010-10-28 Thread DanH
Assuming that post() or postDelayed() starts the Thread is even more popular. On Oct 28, 4:47 pm, fadden fad...@android.com wrote: On Oct 28, 12:35 pm, DanH danhi...@ieee.org wrote: Lemme guess:  You created a Thread but you never started it. Calling run() instead of start() is tremendously