ok, I have changed the code such that the frequent calls into native code (in method validateKey) don't happen any longer. They were unneeded anyway, as the internal cleanup thread can safely assume that the keys are valid. With this change, I can no longer reproduce this issue.
However, I am still left with the impression that Android may at any point suspend background threads in favor of the UI thread regardless of their state and whether they hold locks. If this is true, it imposes very hard requirements on the programmer to avoid cases where lock contention between the UI thread and a background thread can lead to a deadlock, as in my case. At the very least, I would expect this to be documented somewhere, preferably in a prominent place.. chris -- -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.