文件名称:pthread_examples.tar
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [Linux] [C/C++] [源码]
- 上传时间:
- 2008-10-13
- 文件大小:
- 2.5kb
- 下载次数:
- 0次
- 提 供 者:
- 李*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
多线程程序作为一种多任务、并发的工作方式,有以下的优点:
1) 提高应用程序响应。这对图形界面的程序尤其有意义,当一个操作耗时很长时,整个系统都会等待这个操作,此时程序不会响应键盘、鼠标、菜单的操作,而使用多线程技术,将耗时长的操作(time consuming)置于一个新的线程,可以避免这种尴尬的情况。
2) 使多CPU系统更加有效。操作系统会保证当线程数不大于CPU数目时,不同的线程运行于不同的CPU上。
3) 改善程序结构。一个既长又复杂的进程可以考虑分为多个线程,成为几个独立或半独立的运行部分,这样的程序会利于理解和修改。
-multithreaded process as a multi-task, complicated by the way, has the following advantages : 1) improve application response. This graphical interface is especially meaningful, when a very long time-consuming operation, the entire system will wait for the operation, this procedure will not respond to keyboard, mouse, the menu of operations, and the use of multithreading technology, long will be time-consuming operation (time consuming) under a new thread, avoided this embarrassing situation. 2) multi-CPU system more effective. When the operating system would ensure that not more than a few threads CPU number of different threads running on different CPUs. 3) to improve program structure. A long and complex process can be divided into consideration a number of threads, into several indepen
1) 提高应用程序响应。这对图形界面的程序尤其有意义,当一个操作耗时很长时,整个系统都会等待这个操作,此时程序不会响应键盘、鼠标、菜单的操作,而使用多线程技术,将耗时长的操作(time consuming)置于一个新的线程,可以避免这种尴尬的情况。
2) 使多CPU系统更加有效。操作系统会保证当线程数不大于CPU数目时,不同的线程运行于不同的CPU上。
3) 改善程序结构。一个既长又复杂的进程可以考虑分为多个线程,成为几个独立或半独立的运行部分,这样的程序会利于理解和修改。
-multithreaded process as a multi-task, complicated by the way, has the following advantages : 1) improve application response. This graphical interface is especially meaningful, when a very long time-consuming operation, the entire system will wait for the operation, this procedure will not respond to keyboard, mouse, the menu of operations, and the use of multithreading technology, long will be time-consuming operation (time consuming) under a new thread, avoided this embarrassing situation. 2) multi-CPU system more effective. When the operating system would ensure that not more than a few threads CPU number of different threads running on different CPUs. 3) to improve program structure. A long and complex process can be divided into consideration a number of threads, into several indepen
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 3971013pthread_examples.tar.gz 列表