multithreading - Non blocking looper class in android -


looper class in android blocks thread. used execute tasks , when arrived. in case tasks delivered looper thread intermittently, there time gap between tasks. time gap not fixed, changes per user interaction. not want infinite loop of looper class run when there not task, since consume resources. there way such thread executes task , when arrives without blocking thread ?

no. that's idea , function looper. holds thread ready dispatch new tasks (runnable) when available.

if want thread other function, need send runnable thread via looper.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -