In an Activity I do alot of dataloading.
To avoid ui-blocking I call the loading-code over
System.Threading.ThreadPool.QueueUserWorkItem(o => Main.LoadData());
(works fine)
When the loading is done i want to inform the user via alertdialog.
to accomplish this I raise an event in Main.LoadData().
The Activity has subcribed to the event. If its triggert, it should show the
alerdialog.
When I show the alertdialog without RunOnUIThread I get the "Can't create
handler inside thread..." sync-error. Until now I thought, that events,
which are handeled in the UI-thread (Activity) are in sync with the
UI-thread, indipendent of where they come from. that is obviously wrong :D

I already found the solution (RunOnUIThread), but its import to my, to
understand, why C#?, Mono?, Android? shows this behaviour.



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Can-t-create-handler-inside-thread-sync-problem-why-tp5710999.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to