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

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

于 2022-03-10 发布 文件大小:622.00 B
0 246
下载积分: 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 个回复

  • manual function of c
    linux 的c函数手册-manual function of c
    2022-01-26 01:56:52下载
    积分:1
  • 非常好用的tcp/udp封装
    非常好用的tcp/udp封装-very user-friendly tcp/udp Packaging
    2022-06-20 04:29:44下载
    积分:1
  • tcp/ip协议详解
    tcp/ip协议详解-tcp/ip protocol detailed
    2023-08-08 18:50:05下载
    积分:1
  • Is the CPU performance testing tools, and platform
    是CPU性能测试工具,与平台无关。 为第三方工具,可以用来评价系统性能。-Is the CPU performance testing tools, and platform-independent. For third-party tools can be used to evaluate the system performance.
    2022-04-12 21:49:40下载
    积分:1
  • 2023-03-13 01:15:04下载
    积分:1
  • About: Paco (pacKAGE oRGANIZER) is a simple, yet powerful tool to aid package...
    About: Paco (pacKAGE oRGANIZER) is a simple, yet powerful tool to aid package management when installing programs from source code. It uses the LD_PRELOAD method to track package installations, and provides various options to keep the installed software organized. It s mainly a command line application but it has also an optional GTKMM interface. Release focus: Minor bugfixes Changes: Libpaco-log has been rewritten in C. This prevents a glibc installation failure when building LFS in chapter 6. The option -x|--expand has been removed. Several bugs have been fixed in paco, gpaco, and rpm2paco. Author: David Rosal-About: Paco (pacKAGE oRGANIZER) is a simple, yet powerful tool to aid package management when installing programs from source code. It uses the LD_PRELOAD method to track package installations, and provides various options to keep the installed software organized. It s mainly a command line application but it has also an optional GTKMM interface. Rel
    2022-01-31 22:36:41下载
    积分:1
  • 一款运行在linux上的象棋游戏。用GTK/GNOME环境下用GLADE开发。
    一款运行在linux上的象棋游戏。用GTK/GNOME环境下用GLADE开发。-A run in linux on the chess game. With GTK/GNOME development environment with Glade.
    2022-03-17 00:10:34下载
    积分:1
  • cornermp
    CornerMP-1.2.tar.bz2.rar CornerMP-1.2.tar.bz2.rar
    2022-10-03 16:45:03下载
    积分:1
  • ARM S3C2410A可以编码
    arm s3c2410a 下实现的CAN通信代码-arm s3c2410a can code
    2022-07-04 03:41:33下载
    积分:1
  • linux环境下利用QT4做的一个小程序,程序中窗口部件使用了双缓冲技术...
    linux环境下利用QT4做的一个小程序,程序中窗口部件使用了双缓冲技术-linux environment using QT4 do a small procedure, process window using a double buffering components technology
    2022-01-28 01:38:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载