登录
首页 » Linux-Unix program » 在同一个进程地址空间内执行的两个线程。生产者线程生产物品,然后将物品放置在一个空缓冲区中供消费者线程消费。消费者线程从缓冲区中获得物品,然后释放缓冲区。当生产者...

在同一个进程地址空间内执行的两个线程。生产者线程生产物品,然后将物品放置在一个空缓冲区中供消费者线程消费。消费者线程从缓冲区中获得物品,然后释放缓冲区。当生产者...

于 2022-03-10 发布 文件大小:622.00 B
0 164
下载积分: 2 下载次数: 1

代码说明:

在同一个进程地址空间内执行的两个线程。生产者线程生产物品,然后将物品放置在一个空缓冲区中供消费者线程消费。消费者线程从缓冲区中获得物品,然后释放缓冲区。当生产者线程生产物品时,如果没有空缓冲区可用,那么生产者线程必须等待消费者线程释放出一个空缓冲区。当消费者线程消费物品时,如果没有满的缓冲区,那么消费者线程将被阻塞,直到新的物品被生产出来。-In the same address space of a process implemented within the two threads. The producer thread production of goods, and then items placed in an empty buffer in the thread consumption for consumers. Consumer thread to acquire items from the buffer, and then release the buffer. When the producer thread is the production of goods, if there is no empty buffers are available, then the producer thread must wait for the Consumer thread to release an empty buffer. When a consumer thread consumer goods, if the buffer is not full, then the consumer thread will be blocked until the new items were produced.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Mplayer source code, do not have to introduce you. Media type file format MP3 mp...
    Mplayer源码,不用多介绍了吧。 媒体类型 文件格式 MP3 mp3 m3u CD/DVD cda MPEG和AVI视频 mpg mpeg mpv mps m2v m1v mpe mpa avi mp4 m4e RealAudio和RealVideo rt ra rm rmvb rp rv Windows Media wma wmv wax asx asf wm wmx wvx QuickTime mov qt AAC aac m4a m4p 其他媒体 wav mp2 mp1 mpeg pls xpl smi smil flv ssm sdp aif aiff mid midi rmim acp rpl 3gp amr awb 3g2 au-Mplayer source code, do not have to introduce you. Media type file format MP3 mp3 m3uCD/DVD cdaMPEG and AVI video mpg mpeg mpv mps m2v m1v mpe mpa avi mp4 m4eRealAudio and RealVideo rt ra rm rmvb rp rvWindows Media wma wmv wax asx asf wm wmx wvxQuickTime mov qtAAC aac m4a m4p other media wav mp2 mp1 mpeg pls xpl smi smil flv ssm sdp aif aiff mid midi rmim acp rpl 3gp amr awb 3g2 au
    2022-03-21 01:59:37下载
    积分:1
  • 这是公司的linux培训材料,很全面。好东西就拿出来共享
    这是公司的linux培训材料,很全面。好东西就拿出来共享-This is the company"s Linux training materials, very comprehensive. Take good things out sharing
    2022-05-05 19:01:41下载
    积分:1
  • serial programming example in linux
    这是一个串口通信程序Serial34我已经在Linux下编译调试通过-serial programming example in linux
    2023-05-12 14:35:02下载
    积分:1
  • Linux库例程系列一
    Linux库例程系列一-Linux for a series of routines
    2023-05-02 21:05:03下载
    积分:1
  • Solaris下的调整声音大小的程序
    Solaris下的调整声音大小的程序-A program which can adjust voice volume in Solaris OS
    2022-02-27 07:55:12下载
    积分:1
  • Qt4编程指南,“C++ GUI QT4编程与“中国版…
    Qt4程序设计指南,《C++ GUI Programming with Qt4 》的中文版,通过一系列简单的实例,让初学者尽快了解Qt编程,是一本不可多得的好书-Qt4 Programming Guide, " C++ GUI Programming with Qt4" the Chinese version, through a series of simple example, as soon as possible so that beginners learn Qt programming, is a rare book
    2022-05-18 09:26:12下载
    积分:1
  • linux系统引导程序源代码,在linux系统启动之前需要一段引导代码...
    linux系统引导程序源代码,在linux系统启动之前需要一段引导代码-linux system boot source code, in the linux system, need some guidance before the start code
    2022-01-26 02:09:02下载
    积分:1
  • ADSP
    在ADSP-BF533是移植uclinux,不是linux上的mp3的decode的程序,敬请高手指点。-the ADSP-BF533 Basis transplantation is not linux on the MP3 decode the procedure, please master guiding.
    2022-06-17 12:12:05下载
    积分:1
  • Linux PCMCIA卡服务
    Linux PCMCIA Card Services - Linux support for PCMCIA and CardBus devices, including kernel services, client drivers, and user-level utilities.-Linux PCMCIA Card Services- Linux support for PCMCIA and CardBus devices, including kernel services, client drivers, and user-level utilities.
    2022-12-13 14:20:03下载
    积分:1
  • Linux
    Linux核心技术 核心技术 -Linux
    2022-07-01 03:53:50下载
    积分:1
  • 696518资源总数
  • 105877会员总数
  • 14今日下载