Android / threading ...

Michael Meeks michael.meeks at suse.com
Fri Sep 14 09:21:57 PDT 2012


Hi there,

	I just got a crash in the PresentationActivity timerUpdateThread - it's
not related to this (I think) - but I guess this could cause some
nasties I suppose. It seems we're talking to the GUI from multiple
threads concurrently:

http://developer.android.com/guide/components/processes-and-threads.html

	"Additionally, the Andoid UI toolkit is not thread-safe. So, you must
not manipulate your UI from a worker thread—you must do all manipulation
to your user interface from the UI thread. Thus, there are simply two
rules to Android's single thread model:

     1. Do not block the UI thread
     2. Do not access the Android UI toolkit from outside the UI thread"

	I was also amused to stumble over this:

http://weblogs.java.net/blog/kgh/archive/2004/10/multithreaded_t.html

	Which is quite amusing ;-) Anyhow - perhaps I'm missing something - I
don't know what mTimeLabel.setText really does so ...

	Are we doing our slower IPC in a thread and leaving the main thread to
render ? (things are responsive so I assume so generally :-).

	Thanks !

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list