文件名称:example
- 所属分类:
- Internet/网络编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- 王**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
利用共享内存实现多线程间通信。
主线程派生子线程后即处于休眠状态,等待子线程结束时发出结束信号唤醒。在被唤醒后,主线程向屏幕输出结束信息!
线程A向共享内存中写入A~Z的大写字母。
线程B通过共享内存接收这些字母,并将其保存到/test.dat文件中。
注意线程之间的同步互斥! -Using shared memory communication between multi-threading. Derived from sub-thread after main thread is in sleep mode, waiting for the end of the child issued by the end of the thread wake-up signal. After being awakened, the main thread to the end of the output information on the screen! Thread A writes to the shared memory, A ~ Z of the capital letters. Thread B through shared memory to receive these letters, and save it to/test.dat file. Note that the synchronization between threads mutually exclusive!
主线程派生子线程后即处于休眠状态,等待子线程结束时发出结束信号唤醒。在被唤醒后,主线程向屏幕输出结束信息!
线程A向共享内存中写入A~Z的大写字母。
线程B通过共享内存接收这些字母,并将其保存到/test.dat文件中。
注意线程之间的同步互斥! -Using shared memory communication between multi-threading. Derived from sub-thread after main thread is in sleep mode, waiting for the end of the child issued by the end of the thread wake-up signal. After being awakened, the main thread to the end of the output information on the screen! Thread A writes to the shared memory, A ~ Z of the capital letters. Thread B through shared memory to receive these letters, and save it to/test.dat file. Note that the synchronization between threads mutually exclusive!
(系统自动生成,下载前可以参看下载内容)
下载文件列表
example
.......\Makefile
.......\shm_thread.c
.......\Makefile
.......\shm_thread.c