Issue
Is it possible to enforce/recommend an order of created AsyncTasks?
Instead of a queue-like order, I want it to be more like a stack, so that if a new instance of AsyncTask is created and executed, it will have more of a chance of being run than the rest.
Solution
You might be able to pull this off on API Level 11+ via executeOnExecutor()
where you supply your own Executor
. Beyond that, you would need to completely roll this yourself, with your own thread pool and using Handler
or post()
or runOnUiThread()
for the work to be done on the main application thread.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.