On Thu, Jul 7, 2011 at 9:11 AM, andrei-dmitriev <andrei-dmitr...@yandex.ru> wrote: > why there is no a way to poll or peek the message from the event queue? > I want it to implement the break for the routine running on the UI thread. > private void longRoutine() { > while (flag){ > if (queue.peekMessage() != null) { > return; > } > <whatever the code is> > } > } > > Or am I missing something and actually a way exists?
It's called a "background thread". All the cool programmers use them. Why do you think that you need longRoutine() to be on the main application thread? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en