摘要: Class-based actorsA class-based actor is a subtype of event_based_actor and must implement the pure virtual member function make_behavior returning th 阅读全文
posted @ 2016-03-09 10:16 浙江小麦 阅读(3647) 评论(0) 推荐(0) 编辑
摘要: e). 消息延迟发送(和前面没太大区别直接上代码) #include <iostream> #include "caf/all.hpp" #include "caf/io/all.hpp" #include <string> #include <chrono> using namespace std 阅读全文
posted @ 2016-03-06 15:10 浙江小麦 阅读(1135) 评论(0) 推荐(0) 编辑
摘要: c). 同步发送, 等待响应, 超时后收到1个系统消息. 贴上代码 #include <iostream> #include "caf/all.hpp" #include "caf/io/all.hpp" #include <string> #include <thread> #include <c 阅读全文
posted @ 2016-03-06 11:24 浙江小麦 阅读(1091) 评论(0) 推荐(0) 编辑
摘要: a). 发完就忘, 就像上面anon_send 以及send 结果图: 发现scoped_actor 不能使用anon_send 和becoem函数,但我个人理解scoped的send就是anon的发送,发完他就消失了。   b).同步发送, 等待响应. 等待是异步的, 相当于只是期待1个响应. 贴 阅读全文
posted @ 2016-03-04 16:11 浙江小麦 阅读(1104) 评论(0) 推荐(0) 编辑
摘要: 最近干活在写毕设,用到了CAF,看了文档,发现了一些小坑,自己摸索写点随笔。(CAF的github网站 https://github.com/actor-framework/actor-framework)里面的example文件夹例子不错。 但是感觉其实实际使用还是会有很多没讲到。 概念的东西可以 阅读全文
posted @ 2016-03-03 13:42 浙江小麦 阅读(2728) 评论(0) 推荐(0) 编辑