摘要: 1、共享内存及其特点 共享内存(Shared Memory)是一种 ​高效的进程间通信(IPC)机制,允许多个进程直接访问同一块物理内存区域。其特点包括: ​ 高速:绕过内核协议栈,直接操作内存; ​灵活:适用于大数据量传输或频繁通信场景; ​ 风险:需手动管理同步和生命周期,易引发竞态条件(Rac 阅读全文
posted @ 2025-03-14 10:58 左边的翼 阅读(116) 评论(0) 推荐(0)
摘要: 关于GDI+对字符串的测量官方文档中给出5种重载函数,5种重载分为两类,两类的分类方式是按照字符串以何种方式输出定义。下面文字给出官方对两类定义的描述: 第一类:The Graphics::MeasureString method measures the extent of the string 阅读全文
posted @ 2023-12-04 17:24 左边的翼 阅读(195) 评论(0) 推荐(0)
摘要: 1、客户端 #include <stdlib.h> #include <stdio.h> #include <xmlrpc-c/base.h> #include <xmlrpc-c/client.h> #include "config.h" /* information about this bui 阅读全文
posted @ 2023-12-01 16:40 左边的翼 阅读(152) 评论(0) 推荐(0)
摘要: 以下客户端与服务端的代码内容为官网给出的示例,此处拷贝记录,了解基础使用方式。 1、服务端 #include <iostream> #include <winsock2.h> #include <windows.h> #include "xmlrpc-c/base.h" #include "xmlr 阅读全文
posted @ 2023-12-01 16:21 左边的翼 阅读(178) 评论(0) 推荐(0)
摘要: 1、数组操作 #include <iostream> #include <winsock2.h> #include <windows.h> #include <xmlrpc-c/base.hpp> #include <xmlrpc-c/registry.hpp> #include <xmlrpc-c 阅读全文
posted @ 2023-11-30 17:16 左边的翼 阅读(60) 评论(0) 推荐(0)
摘要: #include <iostream> #include <winsock2.h> #include <windows.h> #include <xmlrpc-c/base.hpp> #include <xmlrpc-c/registry.hpp> #include <xmlrpc-c/server 阅读全文
posted @ 2023-11-30 15:37 左边的翼 阅读(58) 评论(0) 推荐(0)
摘要: 形参类型的定义略 The string looks something like this example: i:iii,s: . It is a list of signature strings, separated by commas. In the example, there are tw 阅读全文
posted @ 2023-11-30 10:45 左边的翼 阅读(22) 评论(0) 推荐(0)
摘要: std::packaged_task是C++11引入的标准库类,用于封装可调用对象,如函数等,并将封装对象作为异步任务进行管理,通过与std::future结合使用,完成异步任务结果的获取。 #include <iostream> #include <thread> #include <future 阅读全文
posted @ 2023-11-28 09:54 左边的翼 阅读(358) 评论(0) 推荐(0)
摘要: std::shared_future是C++11的标准库类,其与std::future的不同是允许多个线程使用,多个线程可以同步共享,同时其又不会阻塞等待异步任务的完成。std::shared_future同样也提供get()方法用于获取异步执行的结果。 #include <iostream> #i 阅读全文
posted @ 2023-11-27 17:21 左边的翼 阅读(412) 评论(0) 推荐(0)
摘要: 1、std::async std::async是C++11的标准库函数,用于创建执行异步任务并返回std::future对象来获取异步执行的结果状态。该函数最简单的用法如下所示: #include <iostream> #include <thread> #include <future> std: 阅读全文
posted @ 2023-11-27 14:43 左边的翼 阅读(572) 评论(0) 推荐(0)