文件名称:example
-
所属分类:
- 标签属性:
- 上传时间:2012-11-01
-
文件大小:1.92kb
-
已下载: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/
example/Makefile
example/shm_thread.c
example/Makefile
example/shm_thread.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.