线程间通信(inter-thread communication)必备知识(消息(message)、消息队列(message queue)、循环器(looper)、处理程序(handler)等) ?
基于22个网页-相关网页
我们最终的内存问题是如何在线程间通信。
Our final memory problem is how to communicate between the threads.
既然锁定用于线程间通信,那么取消锁定会开启临界区,而释放锁定会结束临界区,这是行得通的。
Since locks are used for interthread communication, it makes sense that taking out a lock would start a critical region and that releasing the lock would end the critical region.
这种做法的唯一问题就是进程间通信,除此之外都比使用线程要好,因为这样的架构能更平滑地进行扩展。
The only problem with that is inter-process communication, but otherwise it is better because the architecture can grow smoother.
应用推荐