java - How to pause a Thread's Message Queue in Android? -
i queuing bunch of runnables thread via handler.post(). ability send note thread should pause.
by pause mean, finish runnable or message working on, don't go next message or runnable in message queue until tell continue.
in case else finds way question, ended going threadpoolexecutor, using example code in it's documentation creating pausablethreadpoolexecutor: http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/threadpoolexecutor.html
it doesn't use message queue or looper accomplishes trying do, create queue of runnables able paused and/or canceled. has added bonus of being able spread queue on specified number of threads.
Comments
Post a Comment