Android线程—HandlerThread的使用及原理

HanlderThread继承自Thread,它的run()中经过Looper.prepare()建立了消息队列,并经过Looper.loop()开启了消息循环,这样咱们就能够在HandlerThread中建立Handler了(对Android消息机制不熟悉的能够参考Android消息机制(Handler、Looper、MessageQueue),从而外界经过Hanlder通知HandlerThr
相关文章
相关标签/搜索