当前位置: 首页 > news >正文

odoo做网站在线简历制作系统

odoo做网站,在线简历制作系统,东营最新通知今天重要消息,wordpress远程图片下载overwrite_buffer 类 concurrency::overwrite_buffer 类与 unbounded_buffer 类类似#xff0c;只不过 overwrite_buffer 对象仅存储一条消息。 此外#xff0c;当目标接收来自 overwrite_buffer 对象的消息时#xff0c;不会从缓冲区中删除该消息。 因此#xff0c;多个目…overwrite_buffer 类 concurrency::overwrite_buffer 类与 unbounded_buffer 类类似只不过 overwrite_buffer 对象仅存储一条消息。 此外当目标接收来自 overwrite_buffer 对象的消息时不会从缓冲区中删除该消息。 因此多个目标将接收到该消息的副本。 如果你要将多条消息传递到另一个组件而该组件只需要最新的值则 overwrite_buffer 类很有用。 需向多个组件广播消息时此类也很有用。 示例 以下示例使用基本结构来演示如何使用 overwrite_buffer 类。 此示例将三个值发送到 overwrite _buffer 对象然后从该对象读取当前值三次。 此示例类似于 unbounded_buffer 类的示例。 但是overwrite_buffer 类仅存储一条消息。 此外运行时不会在读取消息后从 overwrite_buffer 对象中删除该消息。 // overwrite_buffer-structure.cpp // compile with: /EHsc #include agents.h #include iostreamusing namespace concurrency; using namespace std;int wmain() {// Create an overwrite_buffer object that works with// int data.overwrite_bufferint item;// Send a few items to the overwrite_buffer object.send(item, 33);send(item, 44);send(item, 55);// Read the current item from the overwrite_buffer object and print// it to the console three times.wcout receive(item) endl;wcout receive(item) endl;wcout receive(item) endl; } 该示例产生下面的输出 555555 single_assignment 类 concurrency::single_assignment 类与 overwrite_buffer 类类似只不过只能写入到 single_assignment 对象一次。 与 overwrite_buffer 类相似在目标收到来自 single_assignment 对象的消息时不会从该目标删除此消息。 因此多个目标将接收到该消息的副本。 如果你要向多个组件广播一条消息时single_assignment 类很有用。 示例 以下示例使用基本结构来演示如何使用 single_assignment 类。 此示例将三个值发送到 single_assignment 对象然后从该对象读取当前值三次。 此示例类似于 overwrite_buffer 类的示例。 尽管 overwrite_buffer 和 single_assignment 类都存储一条消息但只能写入到 single_assignment 类一次。 // single_assignment-structure.cpp // compile with: /EHsc #include agents.h #include iostreamusing namespace concurrency; using namespace std;int wmain() {// Create an single_assignment object that works with// int data.single_assignmentint item;// Send a few items to the single_assignment object.send(item, 33);send(item, 44);send(item, 55);// Read the current item from the single_assignment object and print// it to the console three times.wcout receive(item) endl;wcout receive(item) endl;wcout receive(item) endl; } 该示例产生下面的输出 333333 call 类 concurrency::call 类充当消息接收方它在接收数据时执行工作函数。 此工作函数可以是 lambda 表达式、函数对象或函数指针。 call 对象的行为与普通函数调用不同因为它与向它发送消息的其他组件并行运行。 如果 call 对象在接收消息时正在执行工作则它会将该消息添加到队列。 每个 call 对象按消息的接收顺序处理排队的消息。 示例 以下示例使用基本结构来演示如何使用 call 类。 此示例创建一个 call 对象它会将收到的每个值输出到控制台。 然后该示例将三个值发送到 call 对象。 由于 call 对象在单独的线程上处理消息因此此示例还使用了计数器变量和 event 对象来确保 call 对象在 wmain 函数返回之前处理所有消息。 // call-structure.cpp // compile with: /EHsc #include agents.h #include iostreamusing namespace concurrency; using namespace std;int wmain() {// An event that is set when the call object receives all values.event received_all;// Counts the long receive_count 0L;long max_receive_count 3L;// Create an call object that works with int data.callint target([received_all,receive_count,max_receive_count](int n) {// Print the value that the call object receives to the console.wcout n endl;// Set the event when all messages have been processed.if (receive_count max_receive_count)received_all.set();});// Send a few items to the call object.send(target, 33);send(target, 44);send(target, 55);// Wait for the call object to process all items.received_all.wait(); } 该示例产生下面的输出  334455
http://www.hkea.cn/news/14490559/

相关文章:

  • 网站建设相关工作网站设计的第一步是
  • 上海网站建设 百家号太原网站搜索引擎优化
  • 杭州网站开发平均工资做网站流量是什么
  • 网站建设仟首选金手指可以做淘宝推广的网站
  • 旅游项目网站开发搜索引擎调词平台多少钱
  • 企业网站备案多少钱上海网站建设制作百橙
  • 校园互动平台网站建设濮阳做网站的电话
  • 公众平台如何做网站东港网站建设
  • 地情网站建设方案网页前端开发需要学什么
  • 舞钢网站建设用网站模板建网站
  • 手机app网站模板下载用五百丁做名字的简历网站
  • 淘宝客网站需要多大主机百度网页版首页
  • 怎么做网站系统网站dns查询
  • 建立网站信息发布登记制度网站欢迎页面代码
  • 先建设网站后付款青岛网站建设和优化
  • 郑州阿里巴巴网站建设温州网站开发服务商
  • 企业网站每个月流量费辽宁省建设厅网站
  • 在网上做效果图网站怎么做网站滑动图片部分
  • 公司做网站需要注意什么事情服装网都有哪些网站
  • .flv 网站播放wordpress评论详情页
  • 网站怎么解析到域名东莞室内设计公司
  • 深圳网站建设51duoshi运维工程师培训
  • 门户网站 布局dw做好的网页如何发布
  • 网站内链建设的方法昆明网站建设建站技巧
  • 山东省建设执业师之家官方网站做网站的思想体会
  • 云服务器建设网站用什么系统叫企业做的网站可不可以自己改主题
  • 做网站怎么赚钱 做网站怎么赚钱织梦网站修改数据库表数据
  • 南通市经济开发区建设局网站全网热搜榜
  • 济南优化推广网站seo十堰网站建设报价
  • jq网站模板佳木斯市建设局网站