Re: [android-developers] Passing messages between threads.

2010-01-09 Thread Mark Murphy
Edward Hinchliffe wrote: > Thanks mark for the speedy response as always. > > Thread 1 is listening for messages (in xml format) on a TCP socket and > is sending the string over to thread 2. OK, so thread 1 is blocking on network I/O, so that makes sense. > Thread 2 will parse the message > into

Re: [android-developers] Passing messages between threads.

2010-01-09 Thread Edward Hinchliffe
Thanks mark for the speedy response as always. Thread 1 is listening for messages (in xml format) on a TCP socket and is sending the string over to thread 2. Thread 2 will parse the message into an object and interpret it. Thread 2 can also accept message objects and build an xml string, which it'

Re: [android-developers] Passing messages between threads.

2010-01-09 Thread Mark Murphy
redders wrote: > Currently I have two threads, other than the UI thread, which need to > communicate with each other. Why? > Thread one needs to be able to send > messages directly to thread two, and vice versa. Why? > At the minute, my code looks like this: > > runnable1 = new myRunnable();

[android-developers] Passing messages between threads.

2010-01-09 Thread redders
Hi Everyone, Currently I have two threads, other than the UI thread, which need to communicate with each other. Thread one needs to be able to send messages directly to thread two, and vice versa. What is the best way to implement this? At the minute, my code looks like this: runnable1 = new myR