10-15-2012 07:25 PM
When i put my app to thumbnail and then load another app or press standby via power button, I expect, from the docs to have my app be suspended. Yet, I notice my app is still producing file log tracing, i.e. it's still running. My app has two threads, one for log tracing and one event handler. Is this preventing my app from being suspended by the system...
I was under the impression that my app's process and hence all its constituent threads would not be preempted by the scheduler and have no cpu slice afforded to it. Yet, I see trace being produced, even though run_when_backgrounded is not set in my descriptor.
10-15-2012 07:52 PM
10-16-2012 08:51 AM
I've adjusted my code to suspend all secondary threads on thumbnail, inactive and invisible events. My only issue now seems to be a race condition ... Some of my secondary threads interact with the main thread via user events but the system seems to have suspended the main thread before I can even push the user event onto the main thread's active channel.
I wish the docs made it explicit on what happens on standby and when and to what threads.