![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Seastar
ox0080
surprise
展开
-
Seastar不能使用引用蒱获的原因
seastar::future<int> incr(int i) { using namespace std::chrono_literals; // Oops, the "&" below is wrong: return seastar::sleep(10ms).then([&i] { return i + 1; }); } i 是一个栈变...原创 2019-12-23 11:57:43 · 410 阅读 · 0 评论 -
Seastar- complete tutorial (3)
Seastar 是一个 c + + 库,用于在现代多核机器上编写高效的复杂服务器应用程序。 传统上,用于编写服务器应用程序的编程语言库和框架被划分为两个不同的阵营: 注重效率的阵营和注重复杂性的阵营。 有些框架非常高效,但是只允许构建简单的应用程序(例如,DPDK 允许单独处理数据包的应用程序) ,而其他框架允许构建极其复杂的应用程序,代价是运行时效率。 Seastar 是我们两全其美的尝试: 创...原创 2019-11-29 11:50:01 · 413 阅读 · 0 评论 -
Seatsar mini-tutorial(2)
Future and promise A future is a result of a computation that may not be available yet. Examples include: 未来是计算的结果,可能尚未可用,例如: a data buffer that we are reading from the network 我们从网络中读取的数据缓冲区 the expi...原创 2019-11-29 11:41:57 · 125 阅读 · 0 评论 -
Seastar-Basic knowledge(1)
SeaStar is an event-driven framework allowing you to write non-blocking, asynchronouscode in a relatively straightforward manner (once understood). It is based on futures.原创 2019-11-29 11:38:13 · 142 阅读 · 0 评论