multithreading - android thread worker queue -
i have threads runs in app, want if threads called @ same time not execute concurrent. , want wait 1 second delay between run next thread. how can that?
maybe right way implement worker queue of runnables object have use , how? threadpoolexecutor choice?
http://developer.android.com/reference/java/util/concurrent/threadpoolexecutor.html
you use intentservice. implements background thread, , automatically queues start requests. start other service, startservice(intent). documentation: http://developer.android.com/reference/android/app/intentservice.html way ensure background threads allowed finish, when ui-thread sent system or user.
Comments
Post a Comment