A Thread's Message Queue

前面已经说过,Wi n d o w s的一个主要目标是为程序的运行提供一个强壮的环境。为实现这个目标,要保证每个线程运行在一个环境中,在这个环境中每个线程都相信自己是唯一运行的线程。更确切地说,每个线程必须有完全不受其他线程影响的消息队列。而且,每个线程必须有一个模拟环境,使线程可以维持它自己的键盘焦点(keyboard focus)、窗口激活、鼠标捕获等概念。

As I have already said, one of the main goals of Windows is to offer a robust environment for all the applications running. To meet this goal, each thread must run in an environment in which it believes that it is the only thread running. More specifically, each thread must have message queues that are totally unaffected by other threads. In addition, each thread must have a simulated environment that allows the thread to maintain its own notion of keyboard focus, window activation, mouse capture, and so on.

As we described above,one main goal of Windows is to provide the running programs a  robust environment. To achieve this goal, it is guaranteed that each thread is running in a context in which each thread believes that itself is the only running thread. More specifically, each thread must have a message queue which is not disturbed by other threads. Moreover, each thread must have a simulant context which makes the thread have its own concepts such as keyboard focus,window activation,mouse capture etc.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值