Re: Suspend worker thread when in background
"rtrussell" <[email protected]> Mon, 23 Jan 2017 23:23:09 +0000
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
Eric Wing wrote: > Android will happily keep sucking up CPU cycles and battery on your appâs background threads while backgrounded. Worst case, you can just keep eating cycles. What I think I've seen happening is that the worker thread keeps running but the memory that it is using 'disappears', resulting in a segfault as soon as it attempts to access that memory. This was not unexpected, because I assumed it was normal for Android to 'page out' an application's memory when it is in the background, and hence my desire to suspend the worker thread so it won't try to access it. But since you don't seem to think that leaving a worker thread running should be a major problem (other than wasting CPU cycles) am I wrong in my assumption? What would you expect to happen to memory that the application has allocated (in my case using 'mmap') when it is backgrounded? Richard. _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org