Re: Suspend worker thread when in background
Sik the hedgehog <[email protected]> Sat, 21 Jan 2017 05:30:57 -0300
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <CAEyBR+XGEicFWfyqN=JepfSQFmCpj85VMgLrFQ_nLB3LcZNvfQ@mail.gmail.com> |
2017-01-20 22:54 GMT-03:00, Eric Wing <[email protected]>: > - To your original problem of suspending the thread: > I say don’t suspend your threads and just make them end. Design your > threads so you tell them to quit and you do a wait/join. > > Then when your app resumes, start up new threads. If I'm understanding correctly the problem is that the threads crash because they take too long until the next poll (resulting in resources being freed up before the thread can respond), so that still wouldn't solve the issue. Only solution in this case would be to just break down the tasks so it polls more often, at the expense of performance... Also the implication here is that somehow Android is freeing up memory before actually stopping the thread using it. Which sounds dangerous o_O _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org